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

Class Data5UCrawler

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

data5u crawler, http://www.data5u.com

Source from the content-addressed store, hash-verified

7
8
9class Data5UCrawler(BaseCrawler):
10 """
11 data5u crawler, http://www.data5u.com
12 """
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 1

data5u.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected