Skip to main content

A simple and quick way to get a proxy.

Project description

Documentation in Russian

pip install EasyProxies

# __init__.py
from EasyProxies import filters

ParamsType = dict[str, Union[str, int]]
ProxyData = TypeVar('ProxyData', dict[str, Union[str, int, type(None)]], str)
ListOfProxy = list[ProxyData]
DEFAULT_FILTERS = filters.FormatTXT


class Proxies:
    __slots__ = ()
    HOST = 'https://www.proxyscan.io/'

    def __init__(self, default: filters.Filter):
        """Задаёт фильтры по умолчанию"""
        ...

    @classmethod
    def raw_request(cls, params: Union[ParamsType, str]) -> ListOfProxy: ...

    @classmethod
    def get(cls, filters: Union[filters.Filter, ParamsType, str] = DEFAULT_FILTERS) -> ListOfProxy: ...

    @classmethod
    def download_type(cls, protocol: filters.Type) -> list[str]:
        """Вернёт список готовых прокси"""
        ...

Фильтры

Пакет EasyProxy.filters.

Классовая обёртка для https://www.proxyscan.io/api

Примеры фильтров

from EasyProxies import *

my_filters = filters.TypeHTTP | filters.TypeHTTPS  # HTTP или HTTPS прокси
my_filters &= filters.Ping(10) & filters.Uptime(10)  # Пинг не больше 100 и Время безотказной работы 10%
print(*Proxies.get((my_filters & filters.FormatTXT & filters.Limit(20))), sep='\n')
"""
Напечатает до 20-и прокси ip:port каждый с новой строки
"""

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EasyProxies-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

EasyProxies-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file EasyProxies-0.1.1.tar.gz.

File metadata

  • Download URL: EasyProxies-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for EasyProxies-0.1.1.tar.gz
Algorithm Hash digest
SHA256 341e78142375c53f1a92547cdaf1d027c4777e85b0386566b79d96d42d277ead
MD5 b3d40239d95b0472917f18357128f120
BLAKE2b-256 38fd70826ce1c758c87c02c1d8a6f6b22064b8d5fd0533e2134a01a753d3cf36

See more details on using hashes here.

File details

Details for the file EasyProxies-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: EasyProxies-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for EasyProxies-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 159e6548bb1cec0595872468660e47bc3fbba3719d0aad7ec39d8cbc6f2bf31e
MD5 78f3bc673b48f2baf7bd1915a2d790f6
BLAKE2b-256 97893cd291c131a6e9314821e6f71f3f92a69a1d8a1b381fa35d272ade8c3fde

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page