DEV Community

Yash Banait
Yash Banait

Posted on

I am unable to access posts from public accounts on Instagram

0

I am encountering an issue during the execution of the following code.:

import instaloader  
L = instaloader.Instaloader()

username = input("Username: ")

L.download_profile(username, profile_pic_only=False)
Enter fullscreen mode Exit fullscreen mode

Initially, when I implemented the code to retrieve all posts simultaneously, it functioned as anticipated.

However, during the testing phase to achieve my desired objective, the following error has consistently occurred.

JSON Query to graphql/query: Expecting value: line 1 column 1 (char 0) [retrying; skip with ^C]
JSON Query to graphql/query: 401 Unauthorized - "fail" status, message "Please wait a few minutes before you try again." when accessing https://www.instagram.com/graphql/query?variables=%7B%22data%22%3A%7B%22count%22%3A12%2C%22include_relationship_info%22%3Atrue%2C%22latest_besties_reel_media%22%3Atrue%2C%22latest_reel_media%22%3Atrue%7D%2C%22username%22%3A%22yashinrush9%22%2C%22__relay_internal__pv__PolarisFeedShareMenurelayprovider%22%3Afalse%7D&doc_id=7898261790222653&server_timestamps=true [retrying; skip with ^C]
Enter fullscreen mode Exit fullscreen mode

I would greatly appreciate your assistance with the situation at your earliest convenience.

Top comments (0)