(self, html)
| 98 | self.loadWidget.setVisible(False) |
| 99 | |
| 100 | def _parseHtml(self, html): |
| 101 | # print(html) |
| 102 | # encoding = chardet.detect(html) or {} |
| 103 | # html = html.decode(encoding.get("encoding","utf-8")) |
| 104 | html = HTML(html) |
| 105 | # 查找所有的li list_item |
| 106 | lis = html.xpath("//ul[@id='m-pl-container']/li") |
| 107 | # print(lis) |
| 108 | if not lis: |
| 109 | self.Page = -1 # 后面没有页面了 |
| 110 | return |
| 111 | self.Page += 1 |
| 112 | self._makeItem(lis) |
| 113 | |
| 114 | def _makeItem(self, lis): |
| 115 | for li in lis: |