免费的中国代理,网站列表
[1]: lab.crossincode.com [2]: 89ip [3]: www.ip3366.net [4]: ip.jiangxianli.com [5]: www.kuaidaili.com [6]: www.xsdaili.com [7]: www.xicidaili.com [8]: www.superfastip.com [9]: www.freeip.top
安装
pip install freeproxy_cn
使用
循环抓取代理
>>> from freeproxy_cn import Engin
>>> import asyncio
>>> loop = asyncio.get_event_loop()
>>> loop.run_until_complete(Engin().run())
获取代理
>>> from redis import Redis >>> rds = Redis() >>> rds.spop('http://icanhazip.com') 192.168.1.1
参数说明
| Engin参数 | 含义 | | ————– |
| | redis_host | 存储代理的redis的host | | redis_port | 存储代理的redis的port | | redis_password | 存储代理的redis的password | | redis_db | 存储代理的redis使用哪个db,默认为0 | | valid_thread | 用于验证代理有效性的线程数目,默认为4,想加快验证的可以适当增大该参数 | | valid_per_time | 每批验证多少个代理地址,默认20个,可以适当增大该参数加快验证 | | valid_url | 默认为一个返回请求IP网站,这个网站没有区分http和https,实际中需要换成自己要抓取的目标网站来验证代理 | | valid_timeout | 验证超时时间设定,默认为5秒 | ### 改进
可以使用一个web服务器代替redis进行代理提供,暂时还没有写
更新日期
2019-12-23
Home-page: https://github.com/Hexmagic/freeproxy_cn.git Author: Hexmagic Author-email: 191440042@qq.com License: GNU General Public License v3.0 Description: UNKNOWN Platform: UNKNOWN Classifier: Programming Language :: Python :: 3.6 Classifier: Operating System :: OS Independent
Metadata
Release files for freeproxy-cn 1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| freeproxy_cn-1.8.tar.gz | 10.4 kB | Without provenance | Details for freeproxy_cn-1.8.tar.gz |
Release files / freeproxy_cn-1.8.tar.gz
| Download URL | freeproxy_cn-1.8.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25c904d10fea9f00df959c59de8e82f2be45c103f0defa899d45696e38334f78
|
|
BLAKE2b-256 checksum How to use checksums |
115a63c89d3b8deb1519ee2327497c6a44c138544299e1ae9e8de46c8dbd6bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.8
|
Security for freeproxy-cn 1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.