This repository has been archived by the owner on Mar 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Tweet attributes
Francesco Poldi edited this page Mar 4, 2020
·
6 revisions
Here we can see every attribute that a tweet
object can have. You can access this attributes via dot notation (Tweet.id
).
These attributes can be used when formatting the output (config.Format
) and customizing the fields to save in the files (config.Custom["tweet"]
).
- {id}
- {conversation_id}
- {created_at}
- {datestamp}
- {timestamp}
- {timezone}
- {user_id}
- {username}
- {name}
- {place}
- {tweet}
- {mentions}
- {urls}
- {photos}
- {replies_count}
- {retweets_count}
- {likes_count}
- {hashtags}
- {cashtags}
- {link}
- {retweet}
- {quote_url}
- {video}
- {user_rt_id}
- {near}
- {geo}
- {source}
- {retweet_date}
tweet
objects are returned while scraping for tweets, so when one of these functions is used:
twint.run.Search
twint.run.Profile
twint.run.Favorites
import twint
c = twint.Config()
c.Username = "username"
c.Format = "ID {id} | Username {username}"
twint.run.Search(c)
import twint
c = twint.Config()
c.Username = "username"
c.Custom["tweet"] = ["id", "username"]
c.Output = "tweets.csv"
c.Store_csv = True
twint.run.Search(c)
Please remember that Twitter limits how much you can scroll in the user's timeline. So you might not be able to get all the tweets while running .Profile
or .Favorites