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

Method searchContent

plugin/py_3qu.py:132–154  ·  view source on GitHub ↗
(self, key, quick)

Source from the content-addressed store, hash-verified

130 return result
131
132 def searchContent(self, key, quick):
133 header = {
134 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"}
135 url = 'https://www.3qu.live/api/v1/search?page=1&q={0}&type=all&period=0'.format(key)
136 rsp = self.fetch(url, headers=header)
137 jRoot = json.loads(rsp.text)
138 videos = []
139 vodList = jRoot['data']['videos']
140 for vod in vodList:
141 id = vod['id']
142 title = vod['name']
143 img = vod['coverURL']
144 pic = 'https://www.3qu.live{0}'.format(img)
145 videos.append({
146 "vod_id": id,
147 "vod_name": title,
148 "vod_pic": pic,
149 "vod_remarks": ""
150 })
151 result = {
152 'list': videos
153 }
154 return result
155
156 def playerContent(self, flag, id, vipFlags):
157 result = {}

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected