A
A
antobra2021-04-27 22:50:32
PHP
antobra, 2021-04-27 22:50:32

Difficulties with opening any Instagram URL by the parser - redirecting to the login page. How to decide?

Colleagues, this is a question about Instagram parsing. Maybe someone in the know.

I repeat all the headers from my browser and make a request (using php curl) from a rented server, but Instagram keeps returning a 302 error. I make the same request (same code, same headers) via the console (using php curl) from my personal home computer - opens normally.

Instagram began to block IP data centers by default? The IP on the leased server is old (5-6 years old) and never showed up anywhere. Maybe they see that the IP belongs to, for example, hatzner and immediately deploy ...?

Does anyone have any ideas? Or who knows the truth? Or thoughts on how to get around, well, except for the official API)))

Thank you

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SKEPTIC, 2021-04-27
@pro100chel

This is how I work with insta: I log
in and receive an authentication token (cookie) using more or less normal addresses (I can from my home computer, I can from a Russian data center, on a large scale it works well on the Yandex cloud trial with their cloud functions).
Then I use this token where I want until it logs out (it can take more than a day or even several days). You can also listen to what insta throws (she can change the token, as, for example, VKontakte does when changing ip) and save it somewhere. Thus, one session will live almost forever.
Bottom line: yes, insta is very bad about authentication from some kind of f*ck like Germany, especially if you acceded in Russia. But having a session token, you can work with the account from anywhere.

Z
Zettabyte, 2021-04-28
@Zettabyte

Instagram and scraping is the other side of the planet from what I specialize in, but even I came across this information:

Instagram has started applying extremely restrictive limits to requests from IPs that are detected as cloud servers.
A couple of requests will go through at first, but after a moment, all requests will be blocked, with a very long timer until they are unblocked again. After this timer, you get a couple more requests, and the cycle repeats.
Since websites must be hosted in the cloud, any interaction with Instagram becomes extremely difficult if the cloud provider is on Instagram's block list. All the cloud providers I've tried are on that list.

P
Puma Thailand, 2021-04-28
@opium

You can, for example, log
in Or use residential or mobile proxies without authorization

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question