MCPcopy Create free account
hub / github.com/cxapython/catvm / __init__

Method __init__

selenium/shannon_spider/middlewares.py:62–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 随机选择proxy的中间件
61 '''
62 def __init__(self):
63 from shannon_spider.conf.proxy import PROXY_LIST, CONTINUOUS_USE_COUNT
64 self.continuous_use_count = CONTINUOUS_USE_COUNT
65 self.proxy_list = PROXY_LIST
66 self.used_count = {}
67 self.failed_count = {}
68 self.logger = logging.getLogger('proxy')
69 for proxy in self.proxy_list:
70 self.used_count[proxy] = 0
71 self.failed_count[proxy] = 0
72
73 @classmethod
74 def from_crawler(cls, crawler):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected