subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.38k stars 685 forks source link

login_required issue coming every time I make public request. #955

Closed MeetK208 closed 1 year ago

MeetK208 commented 2 years ago

from instagrapi import Client cli = Client() extractdata = ['username','full_name','is_private','profile_pic_url','is_verified','media_count','follower_count','following_count','biography','external_url','account_type','is_business','public_email','business_category_name','category_name']

main_data = [] user_bio_data = cli.user_info_by_username("cristiano").dict()

print(user_bio_data) for i , j in user_bio_data.items(): if i in extractdata: main_data.append({"{}".format(i): user_bio_data[i]})

i am new to this instagrapi. I am trying to run this and gives me login_requires error from past 3 days and I don't know where to go It gives me response of 1 out of every 100 request of different account.past 3 days sometimes runs sometimes not.

Can you tell me what to do. I have seen that use proxy but I don't know how to use it and where to get i tried one but its also not working. I have doubt is there request limit and if yes how should i tackle this because i have to run this script for different public user to extract data from their profile

Can you please have look into this and let me know what should i do next. i am using Instagrapi latest version, Chrome as browser.

adw0rd commented 2 years ago

You need to login or use the best proxies

MeetK208 commented 2 years ago

but I am using user_info_by_username it will give response without any login required if i am not wrong and it will give output perfectly when i run for first 10 or 20 times without any errors. and in my use case i have to use Client() without login.

Wathfea commented 1 year ago

@adw0rd Hi, kinda same situation here. I logged in with 2FA and stored settings. Restarted everything later and logged in again with load_settings. Logged in succesfully. I can get medias by tag without problem. But when I try to upload with photo_upload() I got the following error:

`Photo Upload failed with the following response: <Response [403]>

What should I do differently?