I wrote small program on Python 3.4.2 with Twython module (3.1.2). It works, but not exactly right. Program loads tweets and display them (you can see code below). It loaded 200 tweets, but I read that Twitter API can give access to 3200 tweets. Can I do this with Twython ? And the main problem - tweets load in unreadable form :( I noticed that this is due to the fact that tweets were written on the Cyrillic.
import sys
from twython import Twython
APP_KEY = 'MY_APP_KEY'
APP_SECRET = 'MY_APP_SECRET'
OAUTH_TOKEN = 'MY_OAUTH_TOKEN'
OAUTH_TOKEN_SECRET = 'MY_OAUTH_TOKEN_SECRET'
client_args = {
"headers": {
"accept-charset": "utf-8"
}
}
twitter = Twython(APP_KEY, APP_SECRET,
OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
user_tweets = twitter.get_user_timeline(screen_name='poroshenko',
count=200)
for tweets in user_tweets:
print (tweets['text'].encode('utf-8'))