MCPcopy Create free account
hub / github.com/Python3WebSpider/ProxyPool / parse

Method parse

proxypool/crawlers/public/zhandaye.py:44–53  ·  view source on GitHub ↗
(self, html)

Source from the content-addressed store, hash-verified

42 self.urls.append(url)
43
44 def parse(self, html):
45 doc = pq(html)
46 trs = doc('.cont br').items()
47 for tr in trs:
48 line = tr[0].tail
49 match = re.search(r'(\d+\.\d+\.\d+\.\d+):(\d+)', line)
50 if match:
51 host = match.group(1)
52 port = match.group(2)
53 yield Proxy(host=host, port=port)
54
55
56if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

ProxyClass · 0.90

Tested by

no test coverage detected