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

Script No Longer Works #32

Closed
intothevoid33 opened this issue Jul 26, 2022 · 16 comments
Closed

Script No Longer Works #32

intothevoid33 opened this issue Jul 26, 2022 · 16 comments

Comments

@intothevoid33
Copy link

When running the script, this error now appears:

Traceback (most recent call last):
File "C:\Python310\Scripts\vsco-scraper-script.py", line 33, in
sys.exit(load_entry_point('vsco-scraper==0.65', 'console_scripts', 'vsco-scraper')())
File "C:\Python310\lib\site-packages\vscoscrape\vscoscrape.py", line 763, in main
scraper = Scraper(args.username)
File "C:\Python310\lib\site-packages\vscoscrape\vscoscrape.py", line 25, in init
self.uid = self.session.cookies.get_dict()["vs"]
KeyError: 'vs'

@bialyrycerz
Copy link

I am getting this same error.

@ilovescraperz
Copy link

Same error as OP. Hope this can be worked around

@faiblesse2
Copy link

Okay not just me, thought i had gotten IP blocked

@koriekhov
Copy link

Yep, have same error

@christoarmani
Copy link

I'm getting the same error

@SoulSeek2
Copy link

SoulSeek2 commented Jul 28, 2022

yeah same here.. strange thing is that it already happened yesterday for a while. i usually let it run through a list of accounts and yesterday it already said
"a crashed
b crashed
.. and so on"
but a while later it worked again. today the same thing and if i scrape a single account i get the above mentioned error message

@lazytownfan
Copy link
Contributor

Side note: could this possibly be related to Issue #31?

@mvabdi
Copy link
Owner

mvabdi commented Jul 29, 2022

The endpoints in use on this script, and most other non-selenium based scripts, are over 5 and a half years old. It is kind of a miracle that the original version of this script worked with minor revisions until now.

The last time I added features here, I noticed that vsco did not appear to be using the endpoints any more. They have architected their website differently in the years since.

This issue is happening because an important cookie "['vs']" is no longer being returned by that endpoint. That cookie is used in the endpoint from issue #31, which also appears to not exist anymore.

I think it's unlikely that it is temporary that these apis are down, given that the website still works. For these scrapers to work again essentially involves rewriting their scripts to work with the new logic.

@intothevoid33
Copy link
Author

Thanks for the update. Will this script be updated, or has it run its course?

@SilverMight
Copy link
Contributor

I left a pull request (#33) that seemed to work with VSCO's API changes.

@intothevoid33
Copy link
Author

Thank you, SilverMight! I can confirm that those changes bring the script back to live. Kudos!

@ttp976633
Copy link

as a complete beginner who is just learning the basics, could you explain how I can update the code? I previously used the VSCO Downloader executable file, but I was able to install the vsco-scraper package using the cmd line. Can you explain it to me like I'm 5 how I need to update to fix the script so it works properly? Thanks in advance

@christoarmani
Copy link

as a complete beginner who is just learning the basics, could you explain how I can update the code? I previously used the VSCO Downloader executable file, but I was able to install the vsco-scraper package using the cmd line. Can you explain it to me like I'm 5 how I need to update to fix the script so it works properly? Thanks in advance

I would run the following command pip install vsco-scraper --upgrade in the command line to update vsco-scraper. This can also be found under Getting Started.

@lazytownfan
Copy link
Contributor

With this method, updating via pip can only be done after PR #33 is merged.

@SilverMight
Copy link
Contributor

as a complete beginner who is just learning the basics, could you explain how I can update the code? I previously used the VSCO Downloader executable file, but I was able to install the vsco-scraper package using the cmd line. Can you explain it to me like I'm 5 how I need to update to fix the script so it works properly? Thanks in advance

I'd remove your existing install for now (until it's updated) by doing pip uninstall vsco-scraper. Clone or just download as a zip and extract this repository with the fixes. Enter the directory and run python3 setup.py install and it should install the new version. You may want to use a virtual environment, but use your discretion for that one.

@mvabdi
Copy link
Owner

mvabdi commented Jul 31, 2022

🤦‍♂️, seems like I over thought it. It is cool to me all this works with minimal changes years later.

Thanks @SilverMight for the PR, and @HuggableSquare for having done the heavy work months prior.

The fixes are merged at this time on version 0.7

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

No branches or pull requests