[twitter] prevent "KeyError: 'name'" in '_transform_user()' (#8154)

fixes regression introduced in 5747dbf00c
This commit is contained in:
Mike Fährmann
2025-09-01 20:52:05 +02:00
parent 12a6e0493e
commit 52c932add6

View File

@@ -526,8 +526,8 @@ class TwitterExtractor(Extractor):
entities = legacy["entities"]
self._user_cache[uid] = udata = {
"id" : text.parse_int(uid),
"name" : core["screen_name"],
"nick" : core["name"],
"name" : core.get("screen_name"),
"nick" : core.get("name"),
"location" : user["location"]["location"],
"date" : text.parse_datetime(
core["created_at"], "%a %b %d %H:%M:%S %z %Y"),