flat_json_dict object is passed in the argument. Expected argument is json_dict.
As wrong argument is passed the _mappings.py is returning nan for some of the mapped keys.
For example :
Key "caption" in following function will be nan as flat_json_dict is passed.
@classmethod
def post_from_hashtag_mapping(cls):
"""
Return the mapping needed for parsing a post's JSON data from the JSON
served back after requesting a Hashtag page.
"""
return {
"comments_disabled": deque(["comments_disabled"]),
"id": deque(["id"]),
"caption": deque(["edge_media_to_caption", "edges", 0, "node", "text"]),
"shortcode": deque(["shortcode"]),
"comments": deque(["edge_media_to_comment", "count"]),
"upload_date": deque(["taken_at_timestamp"]),
"dimensions": deque(["dimensions"]),
"height": deque(["height"]),
"width": deque(["width"]),
"display_url": deque(["display_url"]),
"likes": deque(["edge_media_preview_like_count"]),
"owner": deque(["owner_id"]),
"is_video": deque(["is_video"]),
"accessibility_caption": deque(["accessibility_caption"]),
}
_static_scraper.py line no. 155
flat_json_dict object is passed in the argument. Expected argument is json_dict. As wrong argument is passed the
_mappings.py
is returning nan for some of the mapped keys.For example : Key "caption" in following function will be nan as flat_json_dict is passed.