marcopompili / django-instagram

Instagram application for Django.
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

AttributeError: 'NoneType' object has no attribute 'xpath' #17

Closed rbrazileiro closed 5 years ago

rbrazileiro commented 6 years ago

Hi, I had fetch all posts from Instagram normally but I don't know how now I get this error when start runserver.

Django==2.0.7

ERROR:root:user profile "rbrz" not found
Traceback (most recent call last):
  File "/Users/rbrz/.virtualenvs/epneus/lib/python3.6/site-packages/django_instagram/scraper.py", line 28, in instagram_scrap_profile
    page.raise_for_status()
  File "/Users/rbrz/.virtualenvs/epneus/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: No server is available for the request for url: https://www.instagram.com/encruzilhadapneus/
ERROR:root:scripts not found
Traceback (most recent call last):
  File "/Users/rbrz/.virtualenvs/epneus/lib/python3.6/site-packages/django_instagram/scraper.py", line 44, in instagram_profile_js
    return tree.xpath('//script')
AttributeError: 'NoneType' object has no attribute 'xpath'

Any suggestions?

Best.

marcopompili commented 5 years ago

ERROR:root:user profile "rbrz" not found, Name profile is not resolved.

Maybe you were using a private profile, this extension to work properly needs an Instagram public profile.