Open LUCKLIKECLOUD opened 2 years ago
Same as https://github.com/twintproject/twint/issues/1320. It looks like it might be a recent issue. Also getting this on ubuntu VM, and mac with no VPN
It looks like this amendment to the token.py file fixes the issue:
https://github.com/twintproject/twint/issues/1320#issuecomment-1007828229
Overwrite "token.py" with this => https://github.com/Museum-Barberini/twint/edit/fix/RefreshTokenException/twint/token.py
My first step was to install/reinstall twint which failed.
After I used the following libraries (not sure if it was useful): import nest_asyncio nest_asyncio.apply() import twint import requests res = requests.get('https://twitter.com') print(res.text.split('\n')[-1])
I installed a VPN (ProtonVPN), not sure if it was the best one etc and I am open to other suggestions.
I overwrite the file token.py with a different version. The one that I shared here worked.
for me not working either
Issue
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/twint", line 33, in
sys.exit(load_entry_point('twint==2.1.21', 'console_scripts', 'twint')())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/cli.py", line 339, in run_as_command
main()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/cli.py", line 330, in main
run.Search(c)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/run.py", line 410, in Search
run(config, callback)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/run.py", line 329, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/run.py", line 36, in init
self.token.refresh()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twint/token.py", line 69, in refresh
raise RefreshTokenException('Could not find the Guest token in HTML')
twint.token.RefreshTokenException: Could not find the Guest token in HTML
Initial Check
Description of Issue
Environment Details