[twitter] improve handling of deleted tweets (fixes #838)

This commit is contained in:
Mike Fährmann
2020-06-19 14:40:17 +02:00
parent 1ae1df0d27
commit d39eedd9bb

View File

@@ -503,12 +503,14 @@ class TwitterAPI():
for entry in instr[0]["addEntries"]["entries"]:
if entry["entryId"].startswith(entry_tweet):
tid = entry["content"]["item"]["content"]["tweet"]["id"]
if tid not in tweets:
try:
tweet = tweets[
entry["content"]["item"]["content"]["tweet"]["id"]]
except KeyError:
self.extractor.log.debug(
"Skipping unavailable Tweet %s", tid)
"Skipping unavailable Tweet %s",
entry["entryId"][6:])
continue
tweet = tweets[tid]
tweet["user"] = users[tweet["user_id_str"]]
if "quoted_status_id_str" in tweet: