目标是为帐户页面返回 resp.text
当您运行此函数时,您会得到响应代码 429
,表明发出的请求过多。
即使在使用代理链运行脚本时
proxychains python3 file.py
它返回相同的状态代码
文件.py
import requests
def g3t_usr(acc):
""" Surf to account page """
resp = requests.get(f'https://www.instagram.com/{acc}/')
if resp.status_code == 200:
return resp.text
else:
print (resp.status_code)
return resp.text
acc="<some_random_user>"
g3t_usr(acc)
Instagram 是否检查 Python 请求发出的请求并标记它们