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

Class Spider

plugin/py_yiso.py:8–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import requests
7
8class Spider(Spider):
9 def getDependence(self):
10 return ['py_ali']
11 def getName(self):
12 return "py_yiso"
13 def init(self,extend):
14 self.ali = extend[0]
15 print("============py_yiso============")
16 pass
17 def isVideoFormat(self,url):
18 pass
19 def manualVideoCheck(self):
20 pass
21 def homeContent(self,filter):
22 result = {}
23 return result
24 def homeVideoContent(self):
25 result = {}
26 return result
27 def categoryContent(self,tid,pg,filter,extend):
28 result = {}
29 return result
30 header = {
31 "User-Agent": "Mozilla/5.0 (Linux; Android 12; V2049A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36",
32 "Referer": "https://yiso.fun/"
33 }
34 def detailContent(self,array):
35 return self.ali.detailContent(array)
36
37 def searchContent(self,key,quick):
38 url = "https://yiso.fun/api/search?name={0}&from=ali".format(key)
39 vodList = requests.get(url=url, headers=self.header, verify=False).json()["data"]["list"]
40 videos = []
41 for vod in vodList:
42 videos.append({
43 "vod_id": vod["url"],
44 "vod_name": vod["fileInfos"][0]["fileName"],
45 "vod_pic": "https://inews.gtimg.com/newsapp_bt/0/13263837859/1000",
46 "vod_remarks": vod['gmtCreate']
47 })
48 result = {
49 'list':videos
50 }
51 return result
52
53 def playerContent(self,flag,id,vipFlags):
54 return self.ali.playerContent(flag,id,vipFlags)
55
56 config = {
57 "player": {},
58 "filter": {}
59 }
60 header = {}
61
62 def localProxy(self,param):
63 return [200, "video/MP2T", action, ""]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected