[twitter] assume 'conversation_id' when using syndication

not possible to expand replies at the momemt
pull/3473/head
ClosedPort22 2 years ago
parent ce8dbb1ccc
commit be3286206a
No known key found for this signature in database

@ -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.

@ -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")

Loading…
Cancel
Save