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

Method _parseHtml

QFlowLayout/HotPlaylist.py:86–98  ·  view source on GitHub ↗
(self, html)

Source from the content-addressed store, hash-verified

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:

Callers 1

onFinishedMethod · 0.95

Calls 1

_makeItemMethod · 0.95

Tested by

no test coverage detected