简体   繁体   中英

Is there a way to stop selenium from being redirected to login? Scraping Instagram with no api

I am trying to scrape Instagram posts using selenium without using an API. The problem I run into is that Instagram will automatically redirect me to

https://www.instagram.com/accounts/login/

instead of grabbing the link of the post I want. Is there a way to stop Instagram from redirecting me on selenium? here is an example of a json link I am trying to go to instead of the redirected account logins:

https://www.instagram.com/kingjames/?__a=1

I dont want to have to log into an Instagram account.

It probably does not work properly because Instagram does not like datacenter ip ranges and it throws 302 redirect to login in this case. Try residential proxies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM