Scrapy:测试代理ip

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ShellDawn/article/details/81082747
import requests

try:
    requests.get('http://www.baidu.com', proxies={'http': 'http://101.96.11.73:8080'})
except:
    print('connect failed')
else:
    print('success')

猜你喜欢

转载自blog.csdn.net/ShellDawn/article/details/81082747