18766215631
当前位置: 首页 > SDK > python

python

发布时间:2024-04-23

#coding=utf-8
import requests
#
#请求地址 简单提取 具体需要根据实际情况获取 记得添加白名单 http://www.siyetian.com/member/whitelist.html
tiquApiUrl = ''
apiRes = requests.get(tiquApiUrl,timeout=5)
ip = apiRes.text
#代理服务器
ipport = f'http://{ip}'

#要访问的网站链接
url = "https://www.baidu.com" #例如百度

proxies={
    'http':ipport,
    'https':ipport
}
headers = {
    #根据自己业务逻辑填写头信息,
}
res = requests.get(url, proxies=proxies,headers=headers)
print(res.status_code)
print(res.text)
#代码仅供参考

最新资讯

查看更多>>
575535875
扫码加客服微信
18766215631