Upon trying to download images from an account whose username ends with a hyphen, the program crashes with a KeyError. I have tested this in both macOS and Linux and it crashes in both.
This is the error that is output
[REDACTED]@ubuntu:~$ ./.local/bin/vsco-scraper "example-username-that-would-crash-" --getImages
Traceback (most recent call last):
File "/home/[REDACTED]/./.local/bin/vsco-scraper", line 8, in <module>
sys.exit(main())
File "/home/[REDACTED]/.local/lib/python3.9/site-packages/vscoscrape/vscoscrape.py", line 364, in main
scraper = Scraper(args.username)
File "/home/[REDACTED]/.local/lib/python3.9/site-packages/vscoscrape/vscoscrape.py", line 28, in __init__
self.newSiteId()
File "/home/[REDACTED]/.local/lib/python3.9/site-packages/vscoscrape/vscoscrape.py", line 39, in newSiteId
self.siteid = res.json()["sites"][0]["id"]
KeyError: 'sites'
[REDACTED]@ubuntu:~$
Upon trying to download images from an account whose username ends with a hyphen, the program crashes with a
KeyError
. I have tested this in both macOS and Linux and it crashes in both.This is the error that is output