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

Method parse

proxypool/crawlers/public/data5u.py:15–25  ·  view source on GitHub ↗

parse html file to get proxies :return:

(self, html)

Source from the content-addressed store, hash-verified

13 urls = [BASE_URL]
14
15 def parse(self, html):
16 """
17 parse html file to get proxies
18 :return:
19 """
20 doc = pq(html)
21 items = doc('.wlist ul.l2').items()
22 for item in items:
23 host = item.find('span:first-child').text()
24 port = int(item.find('span:nth-child(2)').text())
25 yield Proxy(host=host, port=port)
26
27
28if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

ProxyClass · 0.90

Tested by

no test coverage detected