mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.9k stars 976 forks source link

Unable to download subscription pictures despite subscribed #6477

Open vritrax opened 5 hours ago

vritrax commented 5 hours ago

Hi, when downloading Deviantart gallery, I'm only able to download public access art and not the subscribed ones, despite I have subscribed and able to view those pictures. I have also ran oauth2:deviantart. The error as follows:

gallery-dl --verbose flag https://www.deviantart.com/okara-inu/gallery [gallery-dl][debug] Version 1.27.7 [gallery-dl][debug] Python 3.11.5 - Windows-10-10.0.22631-SP0 [gallery-dl][debug] requests 2.31.0 - urllib3 2.0.4 [gallery-dl][debug] Configuration Files [] [1/2] flag [gallery-dl][debug] Starting DownloadJob for 'flag' [gallery-dl][error] Unsupported URL 'flag' [2/2] https://www.deviantart.com/okara-inu/gallery [gallery-dl][debug] Starting DownloadJob for 'https://www.deviantart.com/okara-inu/gallery' [deviantart][debug] Using DeviantartGalleryExtractor for 'https://www.deviantart.com/okara-inu/gallery' [deviantart][debug] Using default API credentials (client-id 5388) [deviantart][info] Requesting public access token [urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.deviantart.com:443 [urllib3.connectionpool][debug] https://www.deviantart.com:443 "POST /oauth2/token HTTP/1.1" 200 128 [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/user/profile/okara-inu HTTP/1.1" 200 1461 [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/all?username=Okara-inu&offset=0&limit=24&mature_content=true HTTP/1.1" 200 None [deviantart][debug] Switching to private access token [deviantart][info] Refreshing private access token [urllib3.connectionpool][debug] https://www.deviantart.com:443 "POST /oauth2/token HTTP/1.1" 200 180 [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/all?username=Okara-inu&offset=0&limit=24&mature_content=true HTTP/1.1" 200 None [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/CB2F2F79-F120-878D-B2F0-2D0824B066C2?mature_content=true HTTP/1.1" 403 121 [deviantart][debug] {"error":"forbidden","error_description":"Only subscribers may have access to this download.","error_code":403,"status":"error"} .\gallery-dl\deviantart\Okara-inu\deviantart_1118227329_The Cat of the Girl I Like 3.jpg [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/06A752A5-F208-7FE1-26E9-87D254DB769C?mature_content=true HTTP/1.1" 200 609 .\gallery-dl\deviantart\Okara-inu\deviantart_1118226639_The Cat of the Girl I Like 2.jpg [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/3CAC55A0-5556-D1A5-8E3D-6B4CC1004EF8?mature_content=true HTTP/1.1" 200 605 .\gallery-dl\deviantart\Okara-inu\deviantart_1118225070_The Cat of the Girl I Like 1.jpg [urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /okara-inu/art/28-images-Cat-TFs-1118174794 HTTP/1.1" 200 None [deviantart][debug] 1118174794: Failed to extract journal HTML from webpage. Falling back to __INITIAL_STATE__ markup. [deviantart][error] An unexpected error occurred: KeyError - 'markup'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues . [deviantart][debug] Traceback (most recent call last): File "C:\Users\ronny\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\job.py", line 151, in run for msg in extractor: File "C:\Users\ronny\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\deviantart.py", line 180, in items journal = self._extract_journal(deviation) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ronny\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\deviantart.py", line 391, in _extract_journal html = self._textcontent_to_html(deviation, content) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ronny\AppData\Local\Programs\Python\Python311\Lib\site-packages\gallery_dl\extractor\deviantart.py", line 402, in _textcontent_to_html markup = html["markup"]


KeyError: 'markup'

Thanks
mikf commented 5 hours ago

You need to pass logged in cookies and the changes from https://github.com/mikf/gallery-dl/commit/7916c8bf77fb86cbb91deffbb9f38187b971cc77 to get this to work. See https://github.com/mikf/gallery-dl/issues/6254#issuecomment-2466136140

To update:

py -m pip install -U https://github.com/mikf/gallery-dl/archive/master.tar.gz