[twitter] improve handling of deleted tweets (fixes #838)
This commit is contained in:
@@ -503,12 +503,14 @@ class TwitterAPI():
|
|||||||
for entry in instr[0]["addEntries"]["entries"]:
|
for entry in instr[0]["addEntries"]["entries"]:
|
||||||
|
|
||||||
if entry["entryId"].startswith(entry_tweet):
|
if entry["entryId"].startswith(entry_tweet):
|
||||||
tid = entry["content"]["item"]["content"]["tweet"]["id"]
|
try:
|
||||||
if tid not in tweets:
|
tweet = tweets[
|
||||||
|
entry["content"]["item"]["content"]["tweet"]["id"]]
|
||||||
|
except KeyError:
|
||||||
self.extractor.log.debug(
|
self.extractor.log.debug(
|
||||||
"Skipping unavailable Tweet %s", tid)
|
"Skipping unavailable Tweet %s",
|
||||||
|
entry["entryId"][6:])
|
||||||
continue
|
continue
|
||||||
tweet = tweets[tid]
|
|
||||||
tweet["user"] = users[tweet["user_id_str"]]
|
tweet["user"] = users[tweet["user_id_str"]]
|
||||||
|
|
||||||
if "quoted_status_id_str" in tweet:
|
if "quoted_status_id_str" in tweet:
|
||||||
|
|||||||
Reference in New Issue
Block a user