MCPcopy Create free account
hub / github.com/UndCover/PyramidStore / searchContent

Method searchContent

plugin/py_czspp.py:164–189  ·  view source on GitHub ↗
(self, key, quick)

Source from the content-addressed store, hash-verified

162 return result
163
164 def searchContent(self, key, quick):
165 url = 'https://czspp.com/xssearch?q={0}'.format(key)
166 rsp = self.fetch(url)
167 root = self.html(self.cleanText(rsp.text))
168 vodList = root.xpath("//div[contains(@class,'mi_ne_kd')]/ul/li/a")
169 videos = []
170 for vod in vodList:
171 name = vod.xpath('./img/@alt')[0]
172 pic = vod.xpath('./img/@data-original')[0]
173 href = vod.xpath('./@href')[0]
174 tid = self.regStr(href, 'movie/(\\S+).html')
175 res = vod.xpath('./div[@class="jidi"]/span/text()')
176 if len(res) == 0:
177 remark = '全1集'
178 else:
179 remark = vod.xpath('./div[@class="jidi"]/span/text()')[0]
180 videos.append({
181 "vod_id": tid,
182 "vod_name": name,
183 "vod_pic": pic,
184 "vod_remarks": remark
185 })
186 result = {
187 'list': videos
188 }
189 return result
190 config = {
191 "player": {},
192 "filter": {}

Callers

nothing calls this directly

Calls 4

fetchMethod · 0.95
htmlMethod · 0.95
cleanTextMethod · 0.95
regStrMethod · 0.95

Tested by

no test coverage detected