(self,flag,id,vipFlags)
| 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 | subtitle = ids[4] |
| 49 | url = self.getDownloadUrl(shareId,shareToken,fileId,category) |
| 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 | subtitleUrl = self.subtitleContent(id) |
| 62 | result = { |
| 63 | 'parse':'0', |
| 64 | 'playUrl':'', |
| 65 | 'url':realUrl, |
| 66 | 'header':newHeader, |
| 67 | 'subt':subtitleUrl |
| 68 | } |
| 69 | return result |
| 70 | def subtitleContent(self,id): |
| 71 | ids = id.split('+') |
| 72 | shareId = ids[0] |
no test coverage detected