Greendeck Proxy Grabber Package
Project description
greendeck-proxygrabber
This package is developed by Greendeck
Install from pip
https://pypi.org/project/greendeck-proxy/
pip install greendeck-proxygrabber
How to use ?
import the library
import greendeck_proxygrabber
import ProxyGrabber
class
from greendeck_proxygrabber import ProxyGrabber
initialize ProxyGrabber
object
grabber = ProxyGrabber(len_proxy_list, country_code, timeout)
Here default values of some arguments are,
* len_proxy_list = 10
* country_code = 'ALL'
* timeout = 2
Currently the program only supports proxies of combined regions
Getting checked, running proxies
The grab_proxy grab_proxy()
function helps to fetch the proxies.
grabber.grab_proxy()
This returns a dictionary of the following structure:
{
'https': [< list of https proxies >],
'http': [< list of http proxies >],
'region': 'ALL' # default for now
}
Getting an unchecked list of proxies
The grab_proxy proxy_scraper()
function helps to fetch the proxies.
This returns a list of 200 proxies of both type http and https.
from greendeck_proxygrabber import proxy_scraper
proxies_http, proxies_https = proxy_scraper()
This returns list of proxies of type http proxies followed by https proxies.
http_proxies = [< list of http proxies >]
https_proxies = [< list of https proxies >]
Filtering invalid proxies from a list of proxies
The proxy_checker_https
and proxy_checker_http
methods from ProxyChecker
class helps to validate the proxies.
Given a list of proxies, it checks each of them to be valid or not, and returns a list of valid proxies from the proxies feeded to it.
from greendeck_proxygrabber import ProxyChecker
valid_proxies_http = ProxyChecker.proxy_checker_http(proxy_list = proxy_list_http, timeout = 2)
valid_proxies_https = ProxyChecker.proxy_checker_https(proxy_list = proxy_list_https, timeout = 2)
This returns a list with working proxies and None
in place of dead proxies.
How to build your pip package
- open an account here https://pypi.org/
In the parent directory
python setup.py sdist bdist_wheel
twine upload dist/*
references
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for greendeck-proxygrabber-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c9f41b82da1c6a10350773727539c5797c8c3d7827d5040c00d1d00fc518354 |
|
MD5 | 85564aac2b9f1e20d1cbc1369f26b56f |
|
BLAKE2b-256 | e76d075a2940f3720dc7fb81b336f9c34141c1ff171567e8e9e298571c7a01cf |