mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-25 02:45:12 +00:00
Update fptplay.py
This commit is contained in:
parent
698680fc3c
commit
357b639718
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,7 @@ class FptplayIE(InfoExtractor):
|
|||
'duration': '2665',
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
contentId = self._match_id(url)
|
||||
# Need valid cookie with Bearer token, else it won't work
|
||||
|
@ -89,6 +90,7 @@ def _real_extract(self, url):
|
|||
'title': res['result']['title_origin'] if res['result']['title_origin'] else res['result']['title_vie'],
|
||||
'entries': entries,
|
||||
}
|
||||
|
||||
def get_api_with_st_token(self, video_id, episode=None):
|
||||
if episode is not None:
|
||||
path = f'/api/v7.1_w/stream/vod/{video_id}/{0 if episode is None else episode}/adaptive_bitrate'
|
||||
|
@ -98,6 +100,7 @@ def get_api_with_st_token(self, video_id, episode=None):
|
|||
t = hashlib.md5(f'6ea6d2a4e2d3a4bd5e275401aa086d{timestamp}{path}'.encode()).hexdigest().upper()
|
||||
r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||||
n = [int(f'0x{t[2 * o: 2 * o + 2]}', 16) for o in range(len(t) // 2)]
|
||||
|
||||
def convert(e):
|
||||
t = ''
|
||||
n = 0
|
||||
|
|
Loading…
Reference in a new issue