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

Method parse

proxypool/crawlers/public/xiaoshudaili.py:37–48  ·  view source on GitHub ↗

parse html file to get proxies :return:

(self, html)

Source from the content-addressed store, hash-verified

35 self.urls = []
36
37 def parse(self, html):
38 """
39 parse html file to get proxies
40 :return:
41 """
42 doc = pq(html)
43 contents = doc('.cont').text()
44 contents = contents.split("\n")
45 for content in contents:
46 c = content[:content.find("@")]
47 host, port = c.split(":")
48 yield Proxy(host=host, port=int(port))
49
50
51if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

ProxyClass · 0.90

Tested by

no test coverage detected