(self, html)
| 84 | self.loadStarted.emit(False) |
| 85 | |
| 86 | def _parseHtml(self, html): |
| 87 | # print(html) |
| 88 | # encoding = chardet.detect(html) or {} |
| 89 | # html = html.decode(encoding.get("encoding","utf-8")) |
| 90 | html = HTML(html) |
| 91 | # 查找所有的li list_item |
| 92 | lis = html.xpath("//ul[@id='m-pl-container']/li") |
| 93 | # print(lis) |
| 94 | if not lis: |
| 95 | self.Page = -1 # 后面没有页面了 |
| 96 | return |
| 97 | self.Page += 1 |
| 98 | self._makeItem(lis) |
| 99 | |
| 100 | def _makeItem(self, lis): |
| 101 | for li in lis: |