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

"Unable to find guest token" exception on Twitter scrapes from Google Collab #110

Closed
topliftarm opened this issue Oct 10, 2020 · 11 comments
Closed
Labels
bug Something isn't working module:twitter upstream wontfix This will not be worked on

Comments

@topliftarm
Copy link

when search for tweets i give this error :
ScraperException: Unable to find guest token

in this line ---> for i in tweets.get_items():

@gxwyz
Copy link

gxwyz commented Oct 10, 2020

for tweet in snscrape.modules.twitter.TwitterUserScraper(username='twitter').get_items(): if tweet.content: print(tweet.content)

@JustAnotherArchivist
Copy link
Owner

@topliftarm Are you using AWS (or something that runs on AWS like Heroku)?

@JustAnotherArchivist JustAnotherArchivist added module:twitter question Further information is requested labels Oct 10, 2020
@JustAnotherArchivist JustAnotherArchivist changed the title i cant scrape!! ScraperException: Unable to find guest token Oct 11, 2020
@topliftarm
Copy link
Author

@topliftarm Are you using AWS (or something that runs on AWS like Heroku)?

u right! i used colab.....

@JustAnotherArchivist
Copy link
Owner

Sounds like Twitter is blocking Google Colab. @Hamma111 said the same thing in #79 recently.
If true, there's nothing snscrape or I can do about that. You will have to run snscrape somewhere else.

@JustAnotherArchivist JustAnotherArchivist changed the title ScraperException: Unable to find guest token "Unable to find guest token" exception on Twitter scrapes from Google Collab Oct 13, 2020
@JustAnotherArchivist JustAnotherArchivist added bug Something isn't working wontfix This will not be worked on and removed question Further information is requested labels Oct 13, 2020
@JustAnotherArchivist
Copy link
Owner

@arranjdavis, does snscrape still work for you on Google Collab?

@arranjdavis
Copy link

arranjdavis commented Oct 14, 2020

@arranjdavis, does snscrape still work for you on Google Collab?

Yeah, it is working for me, but it's a roundabout way of getting it to work.

First, I needed to get Python 3.8 on the Colab. I do this by installing Anaconda (with Python 3.8) onto the Colab instance, and then launching a Jupyter Notebook via ngrok.

Then I run snsrape from the Jupyter Notebook.

It is working as of now, and you can find the scripts I am using on my GitHub.

@JustAnotherArchivist
Copy link
Owner

Thank you! I have no idea what's wrong then. In any case, it does not appear like a bug in snscrape or something I can change, so I'm closing this issue.

@tsangvin
Copy link

tsangvin commented Apr 9, 2021

I have also encountered this issue, running snscrape on Jupyter. However, I am still grasping how often does it occur at the moment.

@numerosos

This comment was marked as off-topic.

@jrobi001

This comment was marked as off-topic.

@JustAnotherArchivist

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:twitter upstream wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

7 participants