python安全攻防网络代理

it2024-11-24  15

requests模块代理

import requests proxy = '127.0.0.1:1080' proxies = { 'http':'http://' + proxy, 'https':'https://' + proxy } try: respone = requests.get('http://httpbin.rof/get',proxies=proxies) print(respone.text) except Exception as e: print(e)

后续爬虫,购买vps后再测试

最新回复(0)