summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/mgtv.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit7e21328585afda6d66f98ca476301680eeffac32 (patch)
tree266a4e7b20443f94572748781d71fc0375a15037 /yt_dlp/extractor/mgtv.py
parentAdding upstream version 2024.05.27. (diff)
downloadyt-dlp-7e21328585afda6d66f98ca476301680eeffac32.tar.xz
yt-dlp-7e21328585afda6d66f98ca476301680eeffac32.zip
Adding upstream version 2024.07.01.upstream/2024.07.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/mgtv.py')
-rw-r--r--yt_dlp/extractor/mgtv.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/mgtv.py b/yt_dlp/extractor/mgtv.py
index 31ccf00..d5dda06 100644
--- a/yt_dlp/extractor/mgtv.py
+++ b/yt_dlp/extractor/mgtv.py
@@ -77,13 +77,13 @@ class MGTVIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
tk2 = base64.urlsafe_b64encode(
- f'did={str(uuid.uuid4())}|pno=1030|ver=0.3.0301|clit={int(time.time())}'.encode())[::-1]
+ f'did={uuid.uuid4()}|pno=1030|ver=0.3.0301|clit={int(time.time())}'.encode())[::-1]
try:
api_data = self._download_json(
'https://pcweb.api.mgtv.com/player/video', video_id, query={
'tk2': tk2,
'video_id': video_id,
- 'type': 'pch5'
+ 'type': 'pch5',
}, headers=self.geo_verification_headers())['data']
except ExtractorError as e:
if isinstance(e.cause, HTTPError) and e.cause.status == 401:
@@ -160,6 +160,6 @@ class MGTVIE(InfoExtractor):
subtitles.setdefault(locale.lower(), []).append({
'url': sub_url,
'name': sub.get('name'),
- 'ext': 'srt'
+ 'ext': 'srt',
})
return subtitles