mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-01-31 19:51:34 +01:00
[twitter] add 'user_likes' metadata field for liked tweets
i.e. the 'screen_name' of the user whose liked tweets get extracted. Ideally this would replace 'user' or at least be in the same format, but that would break backwards compatibility or be impossible/too complicated thanks to API result differences. (#1421)
This commit is contained in:
parent
8d124a3766
commit
fd858eed7b
@ -339,6 +339,9 @@ class TwitterLikesExtractor(TwitterExtractor):
|
||||
pattern = BASE_PATTERN + r"/(?!search)([^/?#]+)/likes(?!\w)"
|
||||
test = ("https://twitter.com/supernaturepics/likes",)
|
||||
|
||||
def metadata(self):
|
||||
return {"user_likes": self.user}
|
||||
|
||||
def tweets(self):
|
||||
return TwitterAPI(self).timeline_favorites(self.user)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user