A
A
Andrey Volo2017-02-28 11:28:59
Python
Andrey Volo, 2017-02-28 11:28:59

Trouble with python - requests?

In order to get user posts on instagram I use the link: https://www.instagram.com/kevin/media/ , as a result I get data in json format like joxi.ru/krD8nbOsEKa1or
Now I'm trying to get data using requests:
import requests
import json

req = requests.get('https://www.instagram.com/andreymahatma/media')

print(req.url)
responses = json.loads(req.text)
print('responses:', responses)
As a result I get:
result: https://www.instagram.com/andreymahatma/media/

responses: {'status': 'ok', 'items': [], 'more_available': False}

Instead of post data, I get {'status': 'ok', 'items': [], 'more_available': False} in the response. The 'more_available' parameter is also present in the correct response, c True.
What am I doing wrong? How to live with it? :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Myvrenik, 2017-02-28
@mahatma728

The andreymahatma account is private, i.e. his posts are not publicly available, that's why you don't get data in return.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question