(self, html)
| 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 | |
| 56 | if __name__ == '__main__': |