[twitter] fix avatars without 'date' information (#4696)

This commit is contained in:
Mike Fährmann
2023-10-27 17:58:02 +02:00
parent 969be65d0b
commit 218295a4c6
2 changed files with 18 additions and 4 deletions

View File

@@ -287,8 +287,11 @@ class TwitterExtractor(Extractor):
date = text.parse_timestamp(
((tweet_id >> 22) + 1288834974657) // 1000)
else:
date = text.parse_datetime(
tweet["created_at"], "%a %b %d %H:%M:%S %z %Y")
try:
date = text.parse_datetime(
tweet["created_at"], "%a %b %d %H:%M:%S %z %Y")
except Exception:
date = util.NONE
tget = tweet.get
tdata = {