1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 10:42:34 +01:00

[twitter] assume 'conversation_id' when using syndication

not possible to expand replies at the momemt
This commit is contained in:
ClosedPort22 2022-12-30 13:20:55 +08:00
parent ce8dbb1ccc
commit be3286206a
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View File

@ -2635,7 +2635,7 @@ Description
for each Tweet in said timeline.
Note: This requires at least 1 additional API call per initial Tweet.
Age-restricted Tweets cannot be expanded when using the
Age-restricted replies cannot be expanded when using the
`syndication <extractor.twitter.syndication_>`__ API.

View File

@ -1520,6 +1520,12 @@ class TwitterAPI():
else:
retweet_id = None
# assume 'conversation_id' is the same as 'id' when the tweet
# is not a reply
if "conversation_id_str" not in tweet and \
"in_reply_to_status_id_str" not in tweet:
tweet["conversation_id_str"] = tweet["id_str"]
tweet["created_at"] = text.parse_datetime(
tweet["created_at"], "%Y-%m-%dT%H:%M:%S.%fZ").strftime(
"%a %b %d %H:%M:%S +0000 %Y")