MCPcopy
hub / github.com/SpiderClub/haipproxy / procotol_extractor

Method procotol_extractor

crawler/spiders/base.py:134–145  ·  view source on GitHub ↗

extract http protocol,default value is http

(self, detail)

Source from the content-addressed store, hash-verified

132 return items
133
134 def procotol_extractor(self, detail):
135 """extract http protocol,default value is http"""
136 detail = detail.lower()
137 if 'socks5' in detail:
138 protocols = ['socks5']
139 elif 'socks4/5' in detail:
140 protocols = ['socks4', 'socks5']
141 elif 'socks4' in detail:
142 protocols = ['socks4']
143 else:
144 protocols = self.default_protocols
145 return protocols
146
147 def proxy_check(self, ip, port):
148 """

Callers 7

parse_commonMethod · 0.95
parse_jsonMethod · 0.95
parse_gather_proxyMethod · 0.80
parse_cnproxyMethod · 0.80
parse_free_proxyMethod · 0.80
parse_proxylistMethod · 0.80
parse_goubanjiaMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected