jtara1 / imgur_downloader

Python script/class to download an entire Imgur album in one go into a folder of your choice.
MIT License
40 stars 7 forks source link

"Exception: Failed to find regex match in html" #21

Closed Mycah closed 1 year ago

Mycah commented 5 years ago

I was seeing this issue awhile back, but it "went away" but it appears to have returned.

$ python3.5 ~/imgur_downloader/imgur_downloader/imgurdownloader.py https://imgur.com/ADImt3B
Traceback (most recent call last):
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 481, in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 430, in main
    downloader = ImgurDownloader(url)
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 156, in __init__
    self.json_imageIDs = list(self._init_image_ids_with_json(html=html))
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 188, in _init_image_ids_with_json
    raise Exception("Failed to find regex match in html")
Exception: Failed to find regex match in html
Mycah commented 5 years ago

And now it works again. I swear imgur is gaslighting me.

crobo1337 commented 5 years ago

Having this error right now, looks like imgur just started requiring auth to access certain albums.

jtara1 commented 5 years ago

@crobo1337 you mean to access private albums or just some public ones?

crobo1337 commented 5 years ago

It looks like any posts tagged as NSFW require a login now.

https://blog.imgur.com/2019/10/14/discontinuing-support-for-nsfw-reddit-subsections/

Will likely require a re-work to grab an Auth token and pass that with the request. Or just using the api directly.

On Tue, Oct 15, 2019, 12:48 PM James T notifications@github.com wrote:

@crobo1337 https://github.com/crobo1337 you mean to access private albums or just some public ones?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jtara1/imgur_downloader/issues/21?email_source=notifications&email_token=AH4ZGDKOXCAQFGOHDCLUTGLQOXX47A5CNFSM4GJECO7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBJOXSY#issuecomment-542305227, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4ZGDOT6XYMNXPS5GZLXZTQOXX47ANCNFSM4GJECO7A .

Mycah commented 5 years ago

Looks like you can just embed an existing global api key to get it working.

https://github.com/mikf/gallery-dl/issues/446

jtara1 commented 1 year ago

gallery-dl supports downloading from the variety of links this project supports. I'm going to archive this repo.

Check for support for this there or report an issue there.