[twitter] fix 'KeyError' for "temporarily unavailable" users (#8423)

This commit is contained in:
Mike Fährmann
2025-10-16 15:50:48 +02:00
parent d0c1fd0073
commit e42030a3a6

View File

@@ -528,13 +528,13 @@ class TwitterExtractor(Extractor):
"id" : text.parse_int(uid),
"name" : core.get("screen_name"),
"nick" : core.get("name"),
"location" : user["location"]["location"],
"location" : user["location"].get("location"),
"date" : text.parse_datetime(
core["created_at"], "%a %b %d %H:%M:%S %z %Y"),
"verified" : user["verification"]["verified"],
"protected" : user["privacy"]["protected"],
"profile_banner" : lget("profile_banner_url", ""),
"profile_image" : user["avatar"]["image_url"].replace(
"profile_image" : user["avatar"].get("image_url", "").replace(
"_normal.", "."),
"favourites_count": lget("favourites_count"),
"followers_count" : lget("followers_count"),