prox-checker


Nameprox-checker JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/gh0st-work/prox-checker
SummaryAsync python proxy checker
upload_time2023-01-20 02:56:45
maintainer
docs_urlNone
authorAnton Nechaev
requires_python>=3.11,<4.0
licenseMIT
keywords python proxy async aiohttp checker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # prox-checker
**Async python proxy checker**


### Features
- **Works in 2023**
- **No pycurl needed**, OS independent
- **HTTP, Socks4, Socks5**
- **Async**
- **Fast** (<= 1.5kb per check)
- Checks **availability** and **anonymity**
- **Secure**, no data collecting
- **Typed**


## Installation
`pip install prox-checker`

## Usage
```python
...

from prox_checker import ProxyChecker, ProxyProtocol, ProxyCheckerResult


async def check_my_proxies():
    proxies = [
        '144.24.207.98:8080',
        '103.169.130.51:5678',
        '198.58.126.147:51576',
        '45.79.155.9:3128',
        '206.220.175.2:4145',
    ]

    working_proxies: List[ProxyCheckerResult] = await ProxyChecker().check_proxies(
        proxies=proxies,
        proxy_async_limit=1_000,
        protocol_async_limit=3,
        response_timeout=5,
    )

    print(working_proxies)
    '''
    Output: 
    [
        <ProxyCheckerResult url=http://144.24.207.98:8080 proxy=144.24.207.98:8080 protocol=ProxyProtocol.http>, 
        <ProxyCheckerResult url=socks4://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks4>, 
        <ProxyCheckerResult url=socks5://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks5>,
        <ProxyCheckerResult url=socks4://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks4>, 
        <ProxyCheckerResult url=socks5://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks5>
    ]
    
    Leaves only anon working proxies, separated by protocols
    '''
    socks5_urls = [
        result.url
        for result in working_proxies
        if result.protocol == ProxyProtocol.socks5
    ]
    print(socks5_urls)  # ['socks5://198.58.126.147:51576', 'socks5://206.220.175.2:4145']

    max_bandwidth_bytes_s = ProxyChecker.estimate_max_bandwidth_bytes_s(
        proxy_async_limit=1_000,
        protocol_async_limit=3,
    )
    max_bandwidth_mb_s = max_bandwidth_bytes_s / 1024 / 1024
    print(max_bandwidth_mb_s)  # 4.39453125

    custom_judges = [
        'http://proxyjudge.us',
        'http://azenv.net/',
    ]
    custom_judges_working_proxies = await ProxyChecker(judges=custom_judges).check_proxies(
        proxies=proxies,
        proxy_async_limit=1_000,
        protocol_async_limit=3,
        response_timeout=5,
    )
    print(custom_judges_working_proxies)  # same as first

...

```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gh0st-work/prox-checker",
    "name": "prox-checker",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "python,proxy,async,aiohttp,checker",
    "author": "Anton Nechaev",
    "author_email": "antonnechaev990@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/55/5d/f4d23fc3ec72b4d7cedfea446938650fc03e9d4140992ce40d7f249bcb06/prox_checker-0.1.0.tar.gz",
    "platform": null,
    "description": "# prox-checker\n**Async python proxy checker**\n\n\n### Features\n- **Works in 2023**\n- **No pycurl needed**, OS independent\n- **HTTP, Socks4, Socks5**\n- **Async**\n- **Fast** (<= 1.5kb per check)\n- Checks **availability** and **anonymity**\n- **Secure**, no data collecting\n- **Typed**\n\n\n## Installation\n`pip install prox-checker`\n\n## Usage\n```python\n...\n\nfrom prox_checker import ProxyChecker, ProxyProtocol, ProxyCheckerResult\n\n\nasync def check_my_proxies():\n    proxies = [\n        '144.24.207.98:8080',\n        '103.169.130.51:5678',\n        '198.58.126.147:51576',\n        '45.79.155.9:3128',\n        '206.220.175.2:4145',\n    ]\n\n    working_proxies: List[ProxyCheckerResult] = await ProxyChecker().check_proxies(\n        proxies=proxies,\n        proxy_async_limit=1_000,\n        protocol_async_limit=3,\n        response_timeout=5,\n    )\n\n    print(working_proxies)\n    '''\n    Output: \n    [\n        <ProxyCheckerResult url=http://144.24.207.98:8080 proxy=144.24.207.98:8080 protocol=ProxyProtocol.http>, \n        <ProxyCheckerResult url=socks4://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks4>, \n        <ProxyCheckerResult url=socks5://198.58.126.147:51576 proxy=198.58.126.147:51576 protocol=ProxyProtocol.socks5>,\n        <ProxyCheckerResult url=socks4://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks4>, \n        <ProxyCheckerResult url=socks5://206.220.175.2:4145 proxy=206.220.175.2:4145 protocol=ProxyProtocol.socks5>\n    ]\n    \n    Leaves only anon working proxies, separated by protocols\n    '''\n    socks5_urls = [\n        result.url\n        for result in working_proxies\n        if result.protocol == ProxyProtocol.socks5\n    ]\n    print(socks5_urls)  # ['socks5://198.58.126.147:51576', 'socks5://206.220.175.2:4145']\n\n    max_bandwidth_bytes_s = ProxyChecker.estimate_max_bandwidth_bytes_s(\n        proxy_async_limit=1_000,\n        protocol_async_limit=3,\n    )\n    max_bandwidth_mb_s = max_bandwidth_bytes_s / 1024 / 1024\n    print(max_bandwidth_mb_s)  # 4.39453125\n\n    custom_judges = [\n        'http://proxyjudge.us',\n        'http://azenv.net/',\n    ]\n    custom_judges_working_proxies = await ProxyChecker(judges=custom_judges).check_proxies(\n        proxies=proxies,\n        proxy_async_limit=1_000,\n        protocol_async_limit=3,\n        response_timeout=5,\n    )\n    print(custom_judges_working_proxies)  # same as first\n\n...\n\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Async python proxy checker",
    "version": "0.1.0",
    "split_keywords": [
        "python",
        "proxy",
        "async",
        "aiohttp",
        "checker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29fafad0f4d5e95d0e6dac4d3aa2a7ca2142e2f1b97f8ebe67c0b93e85ebade3",
                "md5": "266d773ba6314844ca41cd883c4bda89",
                "sha256": "3029157d910b78da20f2bc82f312edc903bef2bf2b075512762dd19f768a7a06"
            },
            "downloads": -1,
            "filename": "prox_checker-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "266d773ba6314844ca41cd883c4bda89",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 4792,
            "upload_time": "2023-01-20T02:56:43",
            "upload_time_iso_8601": "2023-01-20T02:56:43.026993Z",
            "url": "https://files.pythonhosted.org/packages/29/fa/fad0f4d5e95d0e6dac4d3aa2a7ca2142e2f1b97f8ebe67c0b93e85ebade3/prox_checker-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "555df4d23fc3ec72b4d7cedfea446938650fc03e9d4140992ce40d7f249bcb06",
                "md5": "db4977a0774208bfc5f56ae646e12eb9",
                "sha256": "d7ecf0cfd9dc69d9f8adf3a510e0c27d3b78aa285b703ad106b846f053411731"
            },
            "downloads": -1,
            "filename": "prox_checker-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "db4977a0774208bfc5f56ae646e12eb9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 4933,
            "upload_time": "2023-01-20T02:56:45",
            "upload_time_iso_8601": "2023-01-20T02:56:45.279082Z",
            "url": "https://files.pythonhosted.org/packages/55/5d/f4d23fc3ec72b4d7cedfea446938650fc03e9d4140992ce40d7f249bcb06/prox_checker-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-20 02:56:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "gh0st-work",
    "github_project": "prox-checker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "prox-checker"
}
        
Elapsed time: 0.03082s