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

Method fhdContent

plugin/py_ali.py:40–67  ·  view source on GitHub ↗
(self,flag,id,vipFlags)

Source from the content-addressed store, hash-verified

38 else:
39 return {}
40 def fhdContent(self,flag,id,vipFlags):
41 if not self.login():
42 return {}
43 ids = id.split('+')
44 shareId = ids[0]
45 shareToken = ids[1]
46 fileId = ids[2]
47 category = ids[3]
48 url = self.getDownloadUrl(shareId,shareToken,fileId,category)
49 print(url)
50
51 noRsp = requests.get(url,headers=self.header, allow_redirects=False,verify = False)
52 realUrl = ''
53 if 'Location' in noRsp.headers:
54 realUrl = noRsp.headers['Location']
55 if 'location' in noRsp.headers and len(realUrl) == 0 :
56 realUrl = noRsp.headers['location']
57 newHeader = {
58 "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36",
59 "referer":"https://www.aliyundrive.com/",
60 }
61 result = {
62 'parse':'0',
63 'playUrl':'',
64 'url':realUrl,
65 'header':newHeader
66 }
67 return result
68 def originContent(self,flag,id,vipFlags):
69 if not self.login():
70 return {}

Callers 1

playerContentMethod · 0.95

Calls 2

loginMethod · 0.95
getDownloadUrlMethod · 0.95

Tested by

no test coverage detected