[instagram] default posts like_count to zero
I don't know when/why this happens and for private account reasons can't add an example here, but i had this error out and it feels like a safe fix to default to `0` here.
This commit is contained in:
@@ -165,7 +165,7 @@ class InstagramExtractor(Extractor):
|
|||||||
data = {
|
data = {
|
||||||
"post_id" : post["pk"],
|
"post_id" : post["pk"],
|
||||||
"post_shortcode": post["code"],
|
"post_shortcode": post["code"],
|
||||||
"likes": post.get("like_count"),
|
"likes": post.get("like_count", 0),
|
||||||
"pinned": post.get("timeline_pinned_user_ids", ()),
|
"pinned": post.get("timeline_pinned_user_ids", ()),
|
||||||
"date": text.parse_timestamp(post.get("taken_at")),
|
"date": text.parse_timestamp(post.get("taken_at")),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user