mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-23 19:22:32 +01:00
[twitter] fetch media from pinned tweets (#1203)
This commit is contained in:
parent
2475176d99
commit
25074aec47
@ -647,6 +647,7 @@ class TwitterAPI():
|
||||
if params is None:
|
||||
params = self.params.copy()
|
||||
original_retweets = (self.extractor.retweets == "original")
|
||||
pinned_tweet = True
|
||||
|
||||
while True:
|
||||
cursor = tweet = None
|
||||
@ -659,6 +660,12 @@ class TwitterAPI():
|
||||
tweets = data["globalObjects"]["tweets"]
|
||||
users = data["globalObjects"]["users"]
|
||||
|
||||
if pinned_tweet:
|
||||
if "pinEntry" in instr[-1]:
|
||||
tweet_ids.append(instr[-1]["pinEntry"]["entry"]["content"]
|
||||
["item"]["content"]["tweet"]["id"])
|
||||
pinned_tweet = False
|
||||
|
||||
# collect tweet IDs and cursor value
|
||||
for entry in instr[0]["addEntries"]["entries"]:
|
||||
entry_startswith = entry["entryId"].startswith
|
||||
|
Loading…
Reference in New Issue
Block a user