Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

ValueError while Scrapping Posts #156

@InzamamAnwar

Description

@InzamamAnwar

Describe the bug
Scrapping post using Post method gives error.

Traceback (most recent call last):
  File "/instagram-scrapping/main.py", line 23, in <module>
    post.scrape(headers=headers)
  File "lib/python3.7/site-packages/instascrape/scrapers/post.py", line 88, in scrape
    return_instance.upload_date = datetime.datetime.fromtimestamp(return_instance.timestamp)
ValueError: Invalid value NaN (not a number)

To Reproduce
Steps to reproduce the behavior:

from instascrape import Post

headers = {'user-agent': '', 'cookie': 'sessionid:{SESSION_ID}'}

post = Post("https://www.instagram.com/p/CaDMviujr4q/")
post.scrape(headers=headers)

Expected behavior
Dictionary with Keys mentioned in Wiki-Scrapped Data points

Desktop (please complete the following information):

  • OS: [Ubuntu 18.04 LTS]
  • Browser [chrome]
  • Version [insta-scrape: 2.1.2, chrome: 98.0.4758.80, Python: 3.7.11]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions