chris-greening / instascrape

Powerful and flexible Instagram scraping library for Python, providing easy-to-use and expressive tools for accessing data programmatically
https://chris-greening.github.io/instascrape/
MIT License
625 stars 109 forks source link

ValueError: Invalid value NaN (not a number) #162

Open mariodias opened 2 years ago

mariodias commented 2 years ago

it is not possible to scrape the Post class, follow error:

ValueError Traceback (most recent call last) in () 6 # Scrape their respective data 7 google.scrape(headers=headers) ----> 8 google_post.scrape(headers=headers) 9 google_hashtag.scrape(headers=headers) 10

/usr/local/lib/python3.7/dist-packages/instascrape/scrapers/post.py in scrape(self, mapping, keys, exclude, headers, inplace, session, webdriver) 86 # way to deal with returning a Post object with only partial data 87 if hasattr(return_instance, "timestamp"): ---> 88 return_instance.upload_date = datetime.datetime.fromtimestamp(return_instance.timestamp) 89 if hasattr(return_instance, "shortcode"): 90 return_instance.url = self._url_from_suburl(return_instance.shortcode)

ValueError: Invalid value NaN (not a number)