instascrape
instascrape copied to clipboard
requests lib throwing `Invalid value NaN (not a number)` Error
Looks to me the HTML content is not returned hence the len is null...?
Value error processing url https://www.instagram.com/p/COSfR9mh4WN/ Invalid value NaN (not a number)
Traceback (most recent call last):
post.scrape(headers=headers)
File "/usr/local/lib/python3.9/site-packages/instascrape/scrapers/post.py", line 73, in scrape
return_instance = super().scrape(
File "/usr/local/lib/python3.9/site-packages/instascrape/core/_static_scraper.py", line 144, in scrape
return_data = self._get_json_from_source(self.source, headers=headers, session=session)
File "/usr/local/lib/python3.9/site-packages/instascrape/core/_static_scraper.py", line 244, in _get_json_from_source
html = self._html_from_url(url=url, headers=headers, session=session)
File "/usr/local/lib/python3.9/site-packages/instascrape/core/_static_scraper.py", line 285, in _html_from_url
response = session.get(url, headers=headers)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "
I do we solve using this library