-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Error: twint.token.RefreshTokenException: Could not find the Guest token in HTML #1061
Comments
this seems to me a duplicate of #957 |
I have a similar issue. I am trying to collect some data with twint for time series analysis. To make that, I send searches hour by hour starting from january 2014. After 1000 search I get the same error. I am using Colab |
Getting the same error. Anyone able to come with a work-around? |
Is there a general problem with Twint currently? I seem to get the same error. |
I am having the same issue right now. It was working fine 2 hours ago. |
I speculate there's yet another internal change within twitter that we aren't aware of... |
Yeah @BonfaceKilz could be a possibility. Which os were you using ? I encountered this on Ubuntu 20.04.01 LTS. |
@theshouryagupta I'm running ArchLinux; though I've been running twint in a Guix[0] container [0] https://github.com/pjotrp/guix-notes/blob/master/CONTAINERS.org |
I am using Windows 10. I don't think this is an os related problem. |
I am getting the same error. It was working fine last night. The I tried to clone the branch form above -himanshudabas commented 9 days ago |
@orestislampridis yes you are right. I tried it on macOS too. Same issue... |
fix issue twintproject#1061
how do we install the new commits? |
Getting same problem again |
@data-z "pip uninstall twint" and then "pip install git+git://github.com/ajctrl/twint@patch-1". It works for me now! |
RefreshTokenException: Could not find the Guest token in HTML |
Works for me! Thanks! |
@sukioral Thanks works for me too. |
@orestislampridis Thanks, it works! |
Redirect from Master branch pr, fix twintproject#1061
This worked for me too! Thank you 👍 |
I use this method, but I get new error
I don't know how to fix it |
I tried installing it with Many thanks |
Hi Please could someone give a command line instruction for installing the current version with the patch since pip install git+git://github.com/ajctrl/twint@patch-1 no longer works. I have manually added the new version of Token.py from git, without doing a full Twint re-install but I am getting inconsistent results. For example in the code below, the output works fine if the Username is 'realdonaldtrump' or 'kamalaharris' but I get errors for other (existing) users. For example if Username is 'sainsburys' (a large superstore chain in the UK), or most other names I get a keyerror on the url: _usr.url = ur['data']['user']['legacy']['url'] Less often it fails with 'cannot find the Guest token'. Code used: c = twint.Config() |
@Vickycats I manually added the new version of Token.py and now got the below error CRITICAL:root:twint.run:Twint:Feed:noDataExpecting value: line 1 column 1**** |
Finding similar error code after updating token.py |
Same problem on local, even after updating with the patch mentioned above. Anyone got a solution? |
For me, the above update didn't work either, but uninstalling twint and then install via pip install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint worked now! |
at python 3.9.0 i wrote pip install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint but it didnt worked |
Yeah ok :( I use python 3.7.4 |
I use Python 3.9 on a Mac and I have solved this problem by maybe one of the following two steps: In twint/token.py, change then uninstall and reinstall twint. It works for me! |
Hi all.
I guess the Twitter platform checks the client operating system and if it differs from session.headers, it raises an error. |
Heads up: @DenisOgr 's method works for me inside a Google Cloud Function, but only using python37 as the environment. EDIT: nevermind, doesn't work with 3.7 either, still getting "Could not find the Guest token in HTML" |
still same error
|
Hi, |
This is the error I am getting using Jupyter Notebook Collecting git+git://github.com/ajctrl/twint@patch-1 |
I am getting the same error here |
Hi, I'm still getting this error |
still not fixt for me python 3.8 |
Has anyone found a workaround yet? It randomly works 50% of the time 10% of the time. The other 90% it does not work 100% of the time. |
I modified
[postscript] Even if it works, there may be a slight change in behavior of twint. |
It worked for me. |
solution from @moxac twintproject#1061 (comment)
added lines for catching |
If anyone still has an issue there is a whole thread with multiple solutions here #1320 |
What's the use of this exception? Can I comment it out? |
Changes to token.py to fix exception as indicated here twintproject#1061 (comment)
RefreshTokenException: Could not find the Guest token in HTML |
fixed the issue. thanks. |
Issue twintproject#1061 (comment)
Issue Template
Error: twint.token.RefreshTokenException: Could not find the Guest token in HTML
Initial Check
pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
;Command Ran
Description of Issue
when running Twint I get the following error:
raceback (most recent call last):
File "twitter.py", line 18, in
twint.run.Search(c)
File "/home/ssm-user/.local/lib/python3.8/site-packages/twint/run.py", line 410, in Search
run(config, callback)
File "/home/ssm-user/.local/lib/python3.8/site-packages/twint/run.py", line 329, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "/home/ssm-user/.local/lib/python3.8/site-packages/twint/run.py", line 36, in init
self.token.refresh()
File "/home/ssm-user/.local/lib/python3.8/site-packages/twint/token.py", line 68, in refresh
raise RefreshTokenException('Could not find the Guest token in HTML')
twint.token.RefreshTokenException: Could not find the Guest token in HTML
Environment Details
The text was updated successfully, but these errors were encountered: