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

VSCO error #480

Closed
leblo opened this issue Nov 19, 2019 · 3 comments
Closed

VSCO error #480

leblo opened this issue Nov 19, 2019 · 3 comments
Labels

Comments

@leblo
Copy link

leblo commented Nov 19, 2019

It seems like they put their API behind auth. It looks like another approach might be to get the JSON from the page itself and parsing that.

[gallery-dl][debug] Version 1.11.1
[gallery-dl][debug] Python 3.5.2 - Linux-5.0.0-36-generic-x86_64-with-Ubuntu-19.04-disco
[gallery-dl][debug] requests 2.22.0 - urllib3 1.25.6
[gallery-dl][debug] Starting DownloadJob for 'https://vsco.co/studioshuko/images/1'
[gallery-dl][debug] Updating urllib3 ciphers
[vsco][debug] Using VscoUserExtractor for 'https://vsco.co/studioshuko/images/1'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): vsco.co:443
[urllib3.connectionpool][debug] https://vsco.co:443 "GET /studioshuko/images/1 HTTP/1.1" 200 None
[vsco][error] An unexpected error occurred: KeyError - 'medias'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[vsco][debug] 
Traceback (most recent call last):
  File "/snap/gallery-dl/929/lib/python3.5/site-packages/gallery_dl/job.py", line 48, in run
    for msg in self.extractor:
  File "/snap/gallery-dl/929/lib/python3.5/site-packages/gallery_dl/extractor/vsco.py", line 34, in items
    for img in self.images():
  File "/snap/gallery-dl/929/lib/python3.5/site-packages/gallery_dl/extractor/vsco.py", line 110, in images
    for mid in data["medias"]["bySiteId"][sid]["medias"]["1"]
KeyError: 'medias'
mikf added a commit that referenced this issue Nov 21, 2019
@mikf
Copy link
Owner

mikf commented Nov 21, 2019

This was already fixed in 5513b66, and commit ea09469 does the same for collections.

And by the way: gallery-dl is already parsing the JSON data embedded in the webpage, but they changed its internal structure.

@mikf mikf closed this as completed Nov 21, 2019
@mikf mikf added the bug label Nov 21, 2019
@leblo
Copy link
Author

leblo commented Dec 13, 2019

Seems like they changed things up again:

[vsco][debug] 
Traceback (most recent call last):
  File "/snap/gallery-dl/1009/lib/python3.5/site-packages/gallery_dl/job.py", line 48, in run
    for msg in self.extractor:
  File "/snap/gallery-dl/1009/lib/python3.5/site-packages/gallery_dl/extractor/vsco.py", line 34, in items
    for img in self.images():
  File "/snap/gallery-dl/1009/lib/python3.5/site-packages/gallery_dl/extractor/vsco.py", line 111, in images
    ["medias"]["bySiteId"][sid]["byPage"]["1"]["mediaIds"]
KeyError: 'byPage'

@mikf
Copy link
Owner

mikf commented Dec 13, 2019

Should be fixed with 0629fe8, but, as the commit message says, it's only a matter of time until /collection/ pages get changed as well.

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