[twitter] fix 'KeyError' for "temporarily unavailable" users (#8423)
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user