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

Method categoryContent

plugin/py_douyu.py:38–62  ·  view source on GitHub ↗
(self,tid,pg,filter,extend)

Source from the content-addressed store, hash-verified

36 result = {}
37 return result
38 def categoryContent(self,tid,pg,filter,extend):
39 result = {}
40 url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=douyu&size=20&area={0}&page={1}'.format(tid, pg)
41 rsp = self.fetch(url)
42 content = rsp.text
43 jo = json.loads(content)
44 videos = []
45 vodList = jo['data']
46 for vod in vodList:
47 aid = (vod['roomId']).strip()
48 title = vod['roomName'].strip()
49 img = vod['roomPic'].strip()
50 remark = (vod['ownerName']).strip()
51 videos.append({
52 "vod_id": aid,
53 "vod_name": title,
54 "vod_pic": img,
55 "vod_remarks": remark
56 })
57 result['list'] = videos
58 result['page'] = pg
59 result['pagecount'] = 9999
60 result['limit'] = 90
61 result['total'] = 999999
62 return result
63 def detailContent(self,array):
64 aid = array[0]
65 url = "http://live.yj1211.work/api/live/getRoomInfo?platform=douyu&roomId={0}".format(aid)

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected