Skip to content

Commit

Permalink
[twitter] extract 'source' metadata (#4459)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 28, 2023
1 parent 14af15b commit 06aaedd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gallery_dl/extractor/twitter.py
Expand Up @@ -277,6 +277,8 @@ def _transform_tweet(self, tweet):
else:
note = None

source = tweet["source"]

if "legacy" in tweet:
tweet = tweet["legacy"]

Expand All @@ -303,6 +305,7 @@ def _transform_tweet(self, tweet):
"author" : author,
"user" : self._user or author,
"lang" : tweet["lang"],
"source" : text.extr(source, ">", "<"),
"favorite_count": tget("favorite_count"),
"quote_count" : tget("quote_count"),
"reply_count" : tget("reply_count"),
Expand Down

0 comments on commit 06aaedd

Please sign in to comment.