MCPcopy Create free account
hub / github.com/PyQt5/PyQt / _parseHtml

Method _parseHtml

QListWidget/HotPlaylist.py:100–112  ·  view source on GitHub ↗
(self, html)

Source from the content-addressed store, hash-verified

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:

Callers 1

onFinishedMethod · 0.95

Calls 1

_makeItemMethod · 0.95

Tested by

no test coverage detected