Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[behance] how should a gallery with a broken image be handled? #4523

Closed
Hrxn opened this issue Sep 12, 2023 · 2 comments
Closed

[behance] how should a gallery with a broken image be handled? #4523

Hrxn opened this issue Sep 12, 2023 · 2 comments
Labels

Comments

@Hrxn
Copy link
Contributor

Hrxn commented Sep 12, 2023

First of all, thanks to Mike for the recent behance fixes, has been working really smooth so far!

By going through a bunch of profiles, I've found a gallery that actually has a broken image, as it seems

https://www.behance.net/gallery/13042221/CHANGE-Christmas-2013-Campaign

I only see a very undecorated "404 Not Found" where normally would be the first image in the gallery.
And, accordingly, gallery-dl bails here..

PS C:\Apps\Temp> python.exe C:\Apps\z_repo_public\gallery-dl-master\gallery_dl\__main__.py 'https://www.behance.net/gallery/13042221/CHANGE-Christmas-2013-Campaign' --verbose
Debug  :  gallery-dl -> Version 1.26.0-dev
Debug  :  gallery-dl -> Python 3.11.5 - Windows-10-10.0.19045-SP0
Debug  :  gallery-dl -> requests 2.31.0 - urllib3 2.0.4
Debug  :  gallery-dl -> Configuration Files ['%USERPROFILE%\\gallery-dl.conf']
Debug  :  gallery-dl -> Starting DownloadJob for 'https://www.behance.net/gallery/13042221/CHANGE-Christmas-2013-Campaign'
Debug  :  behance -> Using BehanceGalleryExtractor for 'https://www.behance.net/gallery/13042221/CHANGE-Christmas-2013-Campaign'
Debug  :  cookies -> Extracting cookies from C:\Users\Hrxn\AppData\Local\Google\Chrome\User Data\Profile 4\Network\Cookies
Debug  :  cookies -> Found Local State file at 'C:\Users\Hrxn\AppData\Local\Google\Chrome\User Data\Local State'
Info   :  cookies -> Extracted 2833 cookies from Chrome
Debug  :  cookies -> Cookie version breakdown: {'v10': 2833, 'other': 0, 'unencrypted': 0}
Debug  :  urllib3.connectionpool -> Starting new HTTPS connection (1): www.behance.net:443
Debug  :  urllib3.connectionpool -> https://www.behance.net:443 "GET /gallery/13042221/a HTTP/1.1" 200 None
Error  :  behance -> An unexpected error occurred: TypeError - 'NoneType' object is not subscriptable. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues . [https://www.behance.net/gallery/13042221/CHANGE-Christmas-2013-Campaign]
Debug  :  behance ->
Traceback (most recent call last):
  File "C:\Apps\z_repo_public\gallery-dl-master\gallery_dl\job.py", line 125, in run
    for msg in extractor:
  File "C:\Apps\z_repo_public\gallery-dl-master\gallery_dl\extractor\behance.py", line 131, in items
    imgs = self.get_images(data)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Apps\z_repo_public\gallery-dl-master\gallery_dl\extractor\behance.py", line 180, in get_images
    renditions = module["videoData"]["renditions"]
                 ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
PS C:\Apps\Temp>

But the remaining images of the gallery are still visible..
I'm not really sure how to properly handle this, silently ignoring this is probably also not a good idea, I appreciate to know if a gallery is actually broken in a way. Maybe just emitting a warning?

@mikf
Copy link
Owner

mikf commented Sep 15, 2023

Should be fixed with 32da3c7 by catching the exception and ignoring the video.

@mikf mikf closed this as completed Sep 15, 2023
@Hrxn
Copy link
Contributor Author

Hrxn commented Sep 18, 2023

Tested this and can confirm it's working as intended!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants