Skip to content Skip to sidebar Skip to footer

Ssl Error In Twython Get

I am playing with the twython and requests packages and found something strange which is blocking my code to retrive the tweets. I am working behind the firewall if it helps. Code:

Solution 1:

If you're using Twython 3.0.0, docs can be found at https://twython.readthedocs.org/en/latest/usage/advanced_usage.html#manipulate-the-request-headers-proxies-etc on how to modify the request.

If you're too lazy to look, here is code that will work.

from twython import Twython

client_args = {
    'verify': False
}

twitter = Twython(APP_KEY, APP_SECRET
                  OAUTH_TOKEN, OAUTH_TOKEN_SECRET
                  client_args=client_args)

a = twitter.search(q="@Benton",count=100)

Solution 2:

I think the problem is with the firewall rather than with Twython. I get this error on networks that have blocked Twitter.

Post a Comment for "Ssl Error In Twython Get"