Quick-Start
Let’s see a longer example to learn some of the methods that the library has to offer.
from tweety.bot import Twitter
app = Twitter()
username = "elonmusk"
user = app.get_user_info(username)
all_tweets = app.get_tweets(username)
for tweet in all_tweets:
print(tweet)
Here, we show how to get the user information and tweets from elonmusk
user profile on Twitter
and then iterating over the Tweets
Method
get_user_info
returns the instance ofUser
classMethod
get_tweets
returns the instance ofUserTweets
classReference to all Classes TwDataTypes!