From 357b639718cabc546413e47c04b81b5f4e022127 Mon Sep 17 00:00:00 2001 From: MrHulk <154370583+MrHulk02@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:32:58 +0530 Subject: [PATCH] Update fptplay.py --- yt_dlp/extractor/fptplay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/extractor/fptplay.py b/yt_dlp/extractor/fptplay.py index c98b9b0fed..b1dea9d258 100644 --- a/yt_dlp/extractor/fptplay.py +++ b/yt_dlp/extractor/fptplay.py @@ -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