温馨提示:
1. 此样例支持 Python 2.6—2.7以及3.3以上
2. requests不是python原生库,需要安装才能使用: pip install requests
3. 此样例为json格式,在生成API提取链接时注意选择JSON格式
参考样例
import requests # API接口,返回格式为json api_url = "https://17178.org/xc.php?userpass=xxx:xxx&type=sticky&protocol=socks5&quantity=10&format=us.ipip3.com:port:login:password&session_ttl=30" # API接口返回的ip proxy_ip = requests.get(api_url).json()['data']['proxy_list']