spider_requests库简单ip代理
"""
使用requests 设置ip代理
"""
import requests
def func():
url = 'http://ip.27399.com/'
proxies = {"http":"101.65.24.108:8118"}
# 使用proxies这个函数
html = requests.get(url,proxies=proxies).content.decode()
return html
fg=func()
print(fg)
人生苦短,我用python!