Answer the question
In order to leave comments, you need to log in
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)
result: https://www.instagram.com/andreymahatma/media/
responses: {'status': 'ok', 'items': [], 'more_available': False}
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question