Quick-Start
Let’s see a longer example to learn some of the methods that the library has to offer.
from tweety import TwitterAsync
async def main():
app = TwitterAsync("session")
await app.sign_in(username, password)
target_username = "elonmusk"
user = await app.get_user_info(target_username)
all_tweets = await app.get_tweets(user)
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_inforeturns the instance ofUserclassMethod
get_tweetsreturns the instance ofUserTweetsclassReference to all Classes TwDataTypes!