MCPcopy Create free account

hub / github.com/Python3WebSpider/ProxyPool / functions

Functions82 in github.com/Python3WebSpider/ProxyPool

↓ 31 callersMethodstring
to string :return: <host>:<port>
proxypool/schemas/proxy.py:19
↓ 19 callersMethodcrawl
(self)
proxypool/crawlers/public/zhandaye.py:23
↓ 5 callersMethodall
get all proxies :return: list of proxies
proxypool/storages/redis.py:136
↓ 5 callersFunctionconvert_proxy_or_proxies
convert list of str to valid proxies or proxy :param data: :return:
proxypool/utils/proxy.py:41
↓ 4 callersMethodadd
add proxy and set it to init score :param proxy: proxy, ip:port, like 8.8.8.8:88 :param score: int score :return: res
proxypool/storages/redis.py:37
↓ 4 callersMethodcount
get count of proxies :return: count, int
proxypool/storages/redis.py:129
↓ 4 callersMethoddecrease
decrease score of proxy, if small than PROXY_SCORE_MIN, delete it :param proxy: proxy :return: new score
proxypool/storages/redis.py:94
↓ 4 callersFunctionextract_auth_proxy
extract host and port from a proxy with authentication
proxypool/utils/proxy.py:74
↓ 4 callersMethodfetch
(self, url, **kwargs)
proxypool/crawlers/base.py:13
↓ 4 callersFunctionis_auth_proxy
(data: str)
proxypool/utils/proxy.py:70
↓ 3 callersFunctionfilter_proxies_by_area
filter proxies by country iso code (e.g. 'CN', 'US'), case-insensitive; proxies whose country cannot be resolved are excluded :param prox
proxypool/processors/server.py:63
↓ 3 callersFunctionget_conn
get redis client object :return:
proxypool/processors/server.py:41
↓ 3 callersFunctionget_country_iso
look up the ISO country code (e.g. 'CN', 'US') for an ip address :param ip: ip address string :return: uppercase iso code, or None if unk
proxypool/utils/geo.py:15
↓ 3 callersFunctionget_request_key
read the `key` query parameter and validate its format; reject unexpected characters to avoid redis key probing/injection :return: valida
proxypool/processors/server.py:51
↓ 3 callersFunctionis_ip_valid
check this string is within ip format
proxypool/utils/proxy.py:19
↓ 3 callersFunctionis_valid_proxy
check this string is within proxy format
proxypool/utils/proxy.py:4
↓ 3 callersMethodrandom
get random proxy firstly try to get proxy with max score if not exists, try to get proxy by rank if not exists, raise
proxypool/storages/redis.py:52
↓ 3 callersMethodrandoms
get a batch of random proxies firstly try to get proxies with max score, if not enough, get proxies by rank (score from high
proxypool/storages/redis.py:73
↓ 3 callersMethodrun
(self)
proxypool/scheduler.py:97
↓ 3 callersMethodrun
test main method :return:
proxypool/processors/tester.py:134
↓ 2 callersMethodexists
if proxy exists :param proxy: proxy :return: if exists, bool
proxypool/storages/redis.py:110
↓ 2 callersFunctionis_port_valid
(port)
proxypool/utils/proxy.py:37
↓ 2 callersMethodmax
set proxy to max score :param proxy: proxy :return: new score
proxypool/storages/redis.py:118
↓ 2 callersMethodprocess
used for parse html
proxypool/crawlers/base.py:26
↓ 2 callersMethodrun
(self)
examples/usage2.py:30
↓ 2 callersMethodrun
run crawlers to get proxy :return:
proxypool/processors/getter.py:30
↓ 2 callersMethodtest
test single proxy :param proxy: Proxy object :param session: shared aiohttp session :return:
proxypool/processors/tester.py:39
↓ 1 callersMethod__init__
(self, proxyip)
examples/usage2.py:26
↓ 1 callersMethod__str__
to string, for print :return:
proxypool/schemas/proxy.py:12
↓ 1 callersFunction_test
()
proxypool/processors/tester.py:154
↓ 1 callersMethodbatch
get batch of proxies :param cursor: scan cursor :param count: scan count :return: list of proxies
proxypool/storages/redis.py:143
↓ 1 callersMethodcookies
(self)
proxypool/testers/base.py:15
↓ 1 callersFunctioncrawl
use proxy to crawl page :param url: page url :param proxy: proxy, such as 8.8.8.8:8888 :return: html
examples/usage.py:16
↓ 1 callersMethodcrawl
crawl main method
proxypool/crawlers/base.py:34
↓ 1 callersMethodcrawl
override crawl main method add headers
proxypool/crawlers/public/geonodedaili.py:34
↓ 1 callersMethodcrawl_catalog
(self)
proxypool/crawlers/public/zhandaye.py:27
↓ 1 callersMethodencode
(input_str)
proxypool/crawlers/public/uqidata.py:16
↓ 1 callersFunctiongetChinaIP
(ip='127.0.0.1')
examples/usage2.py:16
↓ 1 callersFunctionget_random_proxy
get random proxy from proxypool :return: proxy
examples/usage.py:8
↓ 1 callersMethodheaders
(self)
proxypool/testers/base.py:12
↓ 1 callersMethodis_full
if proxypool if full return: bool
proxypool/processors/getter.py:22
↓ 1 callersFunctionmain
main method, entry point :return: none
examples/usage.py:27
↓ 1 callersMethodparse
(self, html, url, proxy, expr='{"code":0')
proxypool/testers/base.py:18
↓ 1 callersMethodparse
parse html file to get proxies :return:
proxypool/crawlers/public/yqie.py:16
↓ 1 callersMethodparse_catalog
parse html file to get proxies :return:
proxypool/crawlers/public/zhandaye.py:33
↓ 1 callersMethodrun_tests
test all proxies in batches, reusing a single aiohttp session :return:
proxypool/processors/tester.py:113
Method__init__
(self, fetchSecond)
examples/usage2.py:61
Method__init__
init redis client :param host: redis host :param port: redis port :param password: redis password :param conn
proxypool/storages/redis.py:21
Method__init__
init redis
proxypool/processors/tester.py:31
Method__init__
init db and crawlers
proxypool/processors/getter.py:12
Method__init__
init urls
proxypool/crawlers/public/xiaoshudaili.py:16
Method__str__
proxypool is used out :return:
proxypool/exceptions/empty.py:2
Functionauth_required
(func)
proxypool/processors/server.py:22
Functiondecorator
(*args, **kwargs)
proxypool/processors/server.py:24
Functionget_count
get the count of proxies :return: count, int
proxypool/processors/server.py:156
Functionget_proxy
get a random proxy, can query the specific sub-pool according the (redis) key if PROXY_RAND_KEY_DEGRADED is set to True, will get a universal
proxypool/processors/server.py:89
Functionget_proxy_all
get all proxies, optionally filtered by `area` (country iso code, e.g. CN) :return: all proxies
proxypool/processors/server.py:135
Functionindex
get home page, you can define your own templates :return:
proxypool/processors/server.py:79
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/goubanjia.py:15
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/ip3366.py:16
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/ihuan.py:17
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/uqidata.py:24
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/fatezero.py:14
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/xiaoshudaili.py:37
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/daili66.py:16
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/docip.py:18
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/data5u.py:15
Methodparse
(self, html)
proxypool/crawlers/public/zhandaye.py:44
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/geonodedaili.py:18
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/jiangxianli.py:18
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/kuaidaili.py:17
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/taiyangdaili.py:15
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/xiladaili.py:15
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/ip89.py:15
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/iphai.py:15
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/xicidaili.py:16
Methodparse
parse html file to get proxies :return:
proxypool/crawlers/public/seofangfa.py:18
Methodrun
(self)
examples/usage2.py:65
Methodrun_getter
run getter
proxypool/scheduler.py:38
Methodrun_server
run server for api
proxypool/scheduler.py:53
Functionrun_tester
()
proxypool/processors/tester.py:149
Methodrun_tester
run tester
proxypool/scheduler.py:23