.. image:: https://img.shields.io/pypi/v/proxybroker.svg?style=flat-square :target: https://pypi.python.org/pypi/proxybroker/ .. image:: https://img.shields.io/travis/constverum/ProxyBroker.svg?style=flat-square :target: https://travis-ci.org/constverum/ProxyBroker .. image:: https://img.shields.io/pypi/wheel/proxybroker.svg?style=flat-square :target: https://pypi.python.org/pypi/proxybroker/ .. image:: https://img.shields.io/pypi/pyversions/proxybroker.svg?style=flat-square :target: https://pypi.python.org/pypi/proxybroker/ .. image:: https://img.shields.io/pypi/l/proxybroker.svg?style=flat-square :target: https://pypi.python.org/pypi/proxybroker/
ProxyBrokerは、複数のソースから公開プロキシを非同期で検出し、同時にチェックを行うオープンソースツールです。
.. * Save found proxies to a file in custom format.
aiohttp <https://pypi.python.org/pypi/aiohttp>_aiodns <https://pypi.python.org/pypi/aiodns>_maxminddb <https://pypi.python.org/pypi/maxminddb>_pypiから最新の安定版リリースをインストールするには:
.. code-block:: bash
$ pip install proxybroker
開発中の最新バージョンはGitHubから直接インストールできます:
.. code-block:: bash
$ pip install -U git+https://github.com/constverum/ProxyBroker.git
CLIの例
検索
""""
アメリカ合衆国の高匿名性HTTP(S)プロキシを10件検出して表示:
.. code-block:: bash
$ proxybroker find --types HTTP HTTPS --lvl High --countries US --strict -l 10
.. image:: https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_find_example.gif
取得
""""
10件のUSプロキシを検出してファイルに保存(チェックなし):
.. code-block:: bash
$ proxybroker grab --countries US --limit 10 --outfile ./proxies.txt
.. image:: https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_grab_example.gif
サーブ
"""""
検出された高匿名性HTTP(S)プロキシのプールに着信リクエストを分散するローカルプロキシサーバーを起動:
.. code-block:: bash
$ proxybroker serve --host 127.0.0.1 --port 8888 --types HTTP HTTPS --lvl High
.. image:: https://raw.githubusercontent.com/constverum/ProxyBroker/master/docs/source/_static/cli_serve_example.gif
| 利用可能なオプションの詳細は ``proxybroker --help`` を実行してください。
| コマンドの詳細は ``proxybroker <command> --help`` を実行してください。
基本的なコード例
動作するHTTP(S)プロキシを10件検出して表示:
.. code-block:: python
import asyncio
from proxybroker import Broker
async def show(proxies):
while True:
proxy = await proxies.get()
if proxy is None: break
print('Found proxy: %s' % proxy)
proxies = asyncio.Queue()
broker = Broker(proxies)
tasks = asyncio.gather(
broker.find(types=['HTTP', 'HTTPS'], limit=10),
show(proxies))
loop = asyncio.get_event_loop()
loop.run_until_complete(tasks)
その他の例 <https://proxybroker.readthedocs.io/en/latest/examples.html>_.
https://proxybroker.readthedocs.io/
git checkout -b my-new-featuregit commit -am 'Add some feature'git push origin my-new-featureApache License, Version 2.0のもとでライセンスされています
この製品にはMaxMindが作成したGeoLite2データが含まれており、以下から入手可能です http://www.maxmind.com <http://www.maxmind.com>_.