Open MarkPadley opened 3 years ago
Please use the proxy servers with rotating proxies so that twitter does not block your IPs. Twint does not support proxy usage. I have a workaround for this. Check it
Thanks Deepak - I have incorporated these changes into my installation inside the twint directory and the token.py file using my text editor. This I then saved and ran my code again. Sadly I still am getting the same error! Is there something else I am missing?
I have had a look at the 'config' file and it includes the following concerning proxies... Proxy_host: str = "" Proxy_port: int = 0 Proxy_type: object = None Do I need to make any changes here also?
Did you provide the proxy host, port and type in Config?
This is the example usage for it.
import twint
config = twint.Config()
config.Proxy_host = "51.158.68.68"
config.Proxy_port = "8761"
config.Proxy_type = "http"
config.Username = username
twint.run.Lookup(config)
Thank you Deepak for the ongoing assistance - I input the code exactly as above - received the following ... NameError: name 'username' is not defined - could you spell out for me please exactly what I replace 'username' with?
I tried commenting out the last two lines as follows...
Success!! I seem to have access to tweets again - marvellous!
Further development - as soon as I select 'VPN on' I lose all access to twitter data? With VPN off no problem...?
Thank you Deepak for the ongoing assistance - I input the code exactly as above - received the following ... NameError: name 'username' is not defined - could you spell out for me please exactly what I replace 'username' with?
That is the usage for user profile lookup. username
is the twitter user handle.
Further development - as soon as I select 'VPN on' I lose all access to twitter data? With VPN off no problem...?
That is interesting. I have not looked at the issue with VPN yet. I will let you know if I find something.
Thanks Deepak - I am using Norton VPN for your information - regards, Mark
After approximately fifteen minutes of joy looking at tweets successfully within Jupyter, I then reran a cell which had executed fully a few minutes earlier...
Command Ran
c = twint.Config() c.Username = "noneprivacy"
c.Search = "covid"
Run
twint.run.Search(c)
Error as follows...
RefreshTokenException Traceback (most recent call last)