Skip to content

Instantly share code, notes, and snippets.

@yunusemrecatalcam
Created October 21, 2020 09:13
Show Gist options
  • Save yunusemrecatalcam/46090b8e0236c9e1b35f62c973d31f90 to your computer and use it in GitHub Desktop.
Save yunusemrecatalcam/46090b8e0236c9e1b35f62c973d31f90 to your computer and use it in GitHub Desktop.
Twint Usages
import twint
import requests
# Lookup
c = twint.Config()
c.Username = 'riotgames'
c.Store_object = True
c.Store_object_users_list = []
c.User_full = True
c.User_id = None
twint.run.Lookup(c)
user_info = c.Store_object_users_list[0]
# Tweets
c = twint.Config()
c.Search = "from:riotgames"
c.Store_object = True
c.Limit = 20
twint.run.Search(c)
tlist = twint.output.tweets_list
# Favs
c = twint.Config()
c.Username = "riotgames"
c.User_id = tlist[0].user_id
c.Store_object = True
c.Limit = 20
twint.run.Favorites(c)
tweets_fav = c.favorited_tweets_list
# Following
c = twint.Config()
c.Username = "riotgames"
c.User_id = tlist[0].user_id
c.Store_object = True
c.Limit = 20
twint.run.Following(c)
followings = twint.output.follows_list
twint.output.follows_list = []
# Followers
c = twint.Config()
c.User_id = tlist[0].user_id
c.Username = "riotgames"
c.Limit = 20
c.Store_object = True
twint.run.Followers(c)
followers = twint.output.follows_list
twint.output.follows_list = []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment