MCPcopy Index your code
hub / github.com/Python3WebSpider/ProxyPool / parse

Method parse

proxypool/crawlers/public/fatezero.py:14–26  ·  view source on GitHub ↗

parse html file to get proxies :return:

(self, html)

Source from the content-addressed store, hash-verified

12 urls = [BASE_URL]
13
14 def parse(self, html):
15 """
16 parse html file to get proxies
17 :return:
18 """
19
20 hosts_ports = html.split('\n')
21 for addr in hosts_ports:
22 if(addr):
23 ip_address = json.loads(addr)
24 host = ip_address['host']
25 port = ip_address['port']
26 yield Proxy(host=host, port=port)
27
28if __name__ == '__main__':
29 crawler = FatezeroCrawler()

Callers

nothing calls this directly

Calls 1

ProxyClass · 0.90

Tested by

no test coverage detected