MCPcopy
hub / github.com/yhangf/PythonCrawler / run

Method run

spiderAPI/proxyip.py:18–26  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16 }
17
18 def run(self):
19 global enableips
20 try:
21 html = requests.get('http://httpbin.org/ip', proxies=self.proxies, timeout=5).text
22 result = eval(html)['origin']
23 if result in self.ip:
24 enableips.append(self.ip)
25 except:
26 return False
27
28
29def parser(url):

Callers 2

yield_pictureMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected