1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 20:22:36 +01:00

[twitter] add 'date_bookmarked' metadata (#3816)

This commit is contained in:
Mike Fährmann 2023-04-06 20:16:25 +02:00
parent 1c1f6fdc80
commit f5a59c4170
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -591,6 +591,12 @@ class TwitterBookmarkExtractor(TwitterExtractor):
def tweets(self):
return self.api.user_bookmarks()
def _transform_tweet(self, tweet):
tdata = TwitterExtractor._transform_tweet(self, tweet)
tdata["date_bookmarked"] = text.parse_timestamp(
(int(tweet["sortIndex"]) >> 20) // 1000)
return tdata
class TwitterListExtractor(TwitterExtractor):
"""Extractor for Twitter lists"""