免费在线代理的刮刀

getproxies的Python项目详细描述


获取代理

从免费代理源获取一些免费代理。在

fromgetproxiesimportget_proxiesproxies=get_proxies()print(proxies[:10])# [http://196.18.215.153:3128, https://36.67.89.179:65205, http://35.247.192.53:3128, socks5://113.54.158.40:1080, https://180.122.51.154:9999, socks4://117.44.28.152:9201, https://178.20.137.178:43980, https://109.86.121.118:46333, https://148.77.34.194:39175, socks4://114.99.16.195:1080]

或使用cli:

^{pr2}$

安装

$ pip install getproxies
or for latest code
$ pip install -U git+https://github.com/granitosaurus/getproxies

来源

目前支持这些源

sourcespider
http://free-proxy-list.netFreeProxyListSpider
http://proxy-daily.comProxyDailySpider

扩展使用

对于更详细的代理查询,可以使用ProxyManager

fromgetproxiesimportProxyManagerproxies=ProxyManager(limit=10,# only 10 proxiesprotocol='socks5',# only socks5 proxiescountry='us',# only us proxies)

limit参数可以减少检索时间

Proxy对象也具有扩展属性:

classProxy:host:strport:strprotocol:strcode:str=''country:str=''anonymous:bool=Falsesource:str=''

作为字符串,它们解析为protocol://host:port模板。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
未检测到“空格”的java ASCII码   音频如何在Java中设置SourceDataLine的音量   java MyBatissSpringBoot无法使用作为bean注入的数据源   Java字谜递归列表<List<String>>仅存储空列表<Strings>   java显示30px高的JPanel,然后用minecraft填充剩余空间   java JOGL平滑度   Java:按完整与否对1d对象数组进行排序   arraylist仅当java结构不存在时才将对象添加到java结构中   无法初始化java渲染库在安卓 studio 4.1.1上出现错误   java SpringBoot ClassCastException   java解析文本文件,基于字数   java=运算符引发异常   java使点可拖动并存储新坐标JavaFx   JavaWebSphereApplicationServer:EJB模块和JMS路由器