-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add thumbnail attribute to tweet object #889
Conversation
Fetch the video thumbnail of a tweet
Missing support for:
|
Last commit should add support for SQLite, CSV, JSON and Elasticsearch. I have not updated Pandas because similar data fields: URLs, Photos and Videos are already missing for some reason. |
twint/storage/db.py
Outdated
@@ -265,6 +266,7 @@ def tweets(conn, Tweet, config): | |||
",".join(Tweet.cashtags), | |||
",".join(Tweet.urls), | |||
",".join(Tweet.photos), | |||
",".join(Tweet.thumbnail) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is missing a ,
at the end of the row
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And below at cursor.execute
is missing a ,?
too, since there's a new field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Embarrassing! it wouldn't require join()
either since its not a list. Good catch.
Thanks for the updates; about Pandas, I guess it's not a must also people can load from JSON/CSV so there's still a way If you want to add the few missing fields, it'd be great otherwise don't worry about that. (Anyway is just a dict so not that hard) |
Add missing datafields: video, photos, urls and thumbnail.
I made an amend to last commit with that |
* Add thumbnail attribute to tweet object Fetch the video thumbnail of a tweet * Add Thumbnail support for DB, CSV, JSON and Elasticsearch * Update panda.py Add missing datafields: video, photos, urls and thumbnail.
Fetch the thumbnail of a video in a tweet