-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Instaloader get_comments() function is returning 403 forbidden error with message login required #2480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Bump, facing the same issue. |
same here |
anyone know how to get rid of this |
I tried to log in using session and it worked Loader.load_session("", { |
It seems to work when using cookies instead of an explicit login |
There has been no activity on this question for an extended period of time. This issue will be closed after further 14 days of inactivity. |
Yep Worked. Thanks |
Yeah. But no idea why |
I am trying to get the comments of a post using instaloader. but it returns 403 forbidden with message login required
`
loader = instaloader.Instaloader()
try:
loader.load_session_from_file(username)
except Exception as e:
print(f"Failed to log in: {e}")
post = instaloader.Post.from_shortcode(loader.context, "DCH2uvnzgma")
if (loader.context.is_logged_in):
print("Logged in")
for comment in post.get_comments():
print(f"{comment.owner.username}: {comment.text}")
JSON Query to api/v1/media/3497004342417688986/comments/: 403 Forbidden - "fail" status, message "login_required" when accessing https://i.instagram.com/api/v1/media/3497004342417688986/comments/?can_support_threading=true&permalink_enabled=false
The text was updated successfully, but these errors were encountered: