OlegYurchik / pyInstagram

This is a simple and easy-to-use library for interacting with the Instagram. The library works through the web interface of the Instagram and does not depend on the official API
MIT License
232 stars 49 forks source link

Get unexpected response from 'https://www.instagram.com/accounts/login/' Error: 'ProfilePage' #65

Open beratn opened 4 years ago

beratn commented 4 years ago

Hey I'm trying to connect instagram with using proxy and I got this error

Get unexpected response from 'https://www.instagram.com/accounts/login/' Error: 'ProfilePage'

My codes : settings = { "proxies": { "http": "http://username:password@ip:port", "https": "https://username:password@ip:port", }, } agent = WebAgentAccount( username, logger=logging) agent.auth(password, settings=settings)

I'm pretty sure that my proxy working

kirill568 commented 4 years ago

I solved this problem using vpn

kirill568 commented 4 years ago

I using openvpn on linux, just need a script that enables and disables vpn. Сonfigs for openvpn can be taken here. If you write such a script, could you share it?

beratn commented 4 years ago

But it's not about api connection. It's about new rules of instagram.

If you're trying to access Instagram user profile: Instagram has just changed the behavior of its web version interface. Now no one can view more than a few users' profiles without being authorized on their servers first. In other words, user profiles are no longer publicly available for servers like ours. We're currently searching for ways to solve this problem. Sorry for the inconveniences.

RSS-Bridge/rss-bridge#1271

The reason of this exception is update function in agents.py . Something must change in there @OlegYurchik

kirill568 commented 4 years ago

I get such an error with frequent requests to instagram

Lip4ik commented 4 years ago

When trying to call media using a proxy, it generates a ProfilePage error.

beratn commented 4 years ago

Any solution? @Lip4ik @OlegYurchik @kirill568

kirill568 commented 4 years ago

Any solution? @Lip4ik @OlegYurchik @kirill568

use vpn.

beratn commented 4 years ago

When you looking people's profile without logged, instagram blocking that behavior. That's why we got this error. So you suggest me that using vpn. It's not a solution, it's fudging @kirill568

kirill568 commented 4 years ago

Even if you look at people with registration, you will also get an error. Do you have any solution? @berat703

beratn commented 4 years ago

Why we need to get profile information before login? @kirill568

kirill568 commented 4 years ago

I need to take information from bio for further processing, I can go through about 800 accounts, then I get the 'ProfilePage' error, which does not allow me to continue processing. It doesn’t matter to me whether I am authorized or not, because in any case I can read bio. @berat703

beratn commented 4 years ago

I'm developing a SaaS application that allows users to login their account. I'm login 2 accounts successfully then I got ProfilePage error when trying to login third account. That's why I should fix the problem. @kirill568

kirill568 commented 4 years ago

Are you logged in from the same machine? @berat703

beratn commented 4 years ago

For now, yes. But they will use proxy for each account connection. @kirill568

kirill568 commented 4 years ago

Have you tried using a proxy? It’s just that with this library I couldn’t manage to configure the use of proxies. @berat703

beratn commented 4 years ago

As I remember, I tried to use once 3 months ago and It worked. But I will try again in a week @kirill568

kirill568 commented 4 years ago

where did you get the ip addresses?

beratn commented 4 years ago

https://proxy-seller.com @kirill568

beratn commented 4 years ago

Did you implemented 2Fact Auth @kirill568

kirill568 commented 4 years ago

No, because it’s not necessary for my tasks @berat703

ozzyst commented 4 years ago

I have this problem too.... And I don`t want buy proxies. Maybe do you have some resolve for it? Maybe I need to stop my script by 24 hours or maybe somewhat else...

beratn commented 4 years ago

For temporary solution, check my commit which name is "ProfilePage bug fix"

https://github.com/berat703/pyInstagram

@ozzyst @kirill568

ozzyst commented 4 years ago

@berat703 Thank you so much but I moved to instabot library already.