
Proxy [Chercheur | Vérificateur | Serveur]. HTTP(S) & SOCKS 🎭
.. 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 est un outil open source qui trouve de manière asynchrone des proxys publics à partir de multiples sources et les vérifie simultanément.
.. * Enregistrer les proxys trouvés dans un fichier au format personnalisé.
aiohttp <https://pypi.python.org/pypi/aiohttp>_aiodns <https://pypi.python.org/pypi/aiodns>_maxminddb <https://pypi.python.org/pypi/maxminddb>_Pour installer la dernière version stable depuis pypi :
.. code-block:: bash
$ pip install proxybroker
La dernière version de développement peut être installée directement depuis GitHub :
.. code-block:: bash
$ pip install -U git+https://github.com/constverum/ProxyBroker.git
Exemples CLI
Trouver
"""""""
Trouver et afficher 10 proxys HTTP(S) des États-Unis avec un niveau d'anonymat élevé :
.. 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
Récupérer
"""""""""
Trouver et enregistrer dans un fichier 10 proxys US (sans vérification) :
.. 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
Servir
""""""
Exécuter un serveur proxy local qui distribue les requêtes entrantes vers un pool
de proxys HTTP(S) trouvés avec un niveau d'anonymat élevé :
.. 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
| Exécutez ``proxybroker --help`` pour plus d'informations sur les options disponibles.
| Exécutez ``proxybroker <commande> --help`` pour plus d'informations sur une commande.
Exemple de code de base
Trouver et afficher 10 proxys HTTP(S) fonctionnels :
.. 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)
Plus d'exemples <https://proxybroker.readthedocs.io/en/latest/examples.html>_.
https://proxybroker.readthedocs.io/
git checkout -b my-new-featuregit commit -am 'Ajouter une fonctionnalité'git push origin my-new-featureSous licence Apache License, Version 2.0
Ce produit inclut des données GeoLite2 créées par MaxMind, disponibles sur http://www.maxmind.com <http://www.maxmind.com>_.