From fd5a06560caab95c71a2e2e805efa8d0f3a696a0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 5 Aug 2024 11:06:11 +0200 Subject: Merging upstream version 2024.07.01. Signed-off-by: Daniel Baumann --- yt_dlp/extractor/toggle.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'yt_dlp/extractor/toggle.py') diff --git a/yt_dlp/extractor/toggle.py b/yt_dlp/extractor/toggle.py index 7073733..de2e03f 100644 --- a/yt_dlp/extractor/toggle.py +++ b/yt_dlp/extractor/toggle.py @@ -26,7 +26,7 @@ class ToggleIE(InfoExtractor): }, 'params': { 'skip_download': 'm3u8 download', - } + }, }, { 'note': 'DRM-protected video', 'url': 'http://www.mewatch.sg/en/movies/dug-s-special-mission/341413', @@ -40,7 +40,7 @@ class ToggleIE(InfoExtractor): }, 'params': { 'skip_download': 'DRM-protected wvm download', - } + }, }, { # this also tests correct video id extraction 'note': 'm3u8 links are geo-restricted, but Android/mp4 is okay', @@ -56,7 +56,7 @@ class ToggleIE(InfoExtractor): 'params': { 'skip_download': 'DRM-protected wvm download', }, - 'skip': 'm3u8 links are geo-restricted' + 'skip': 'm3u8 links are geo-restricted', }, { 'url': 'http://video.toggle.sg/en/clips/seraph-sun-aloysius-will-suddenly-sing-some-old-songs-in-high-pitch-on-set/343331', 'only_matching': True, @@ -92,14 +92,14 @@ class ToggleIE(InfoExtractor): 'LocaleLanguage': '', 'LocaleCountry': '', 'LocaleDevice': '', - 'LocaleUserState': 0 + 'LocaleUserState': 0, }, 'Platform': 0, 'SiteGuid': 0, 'DomainID': '0', 'UDID': '', 'ApiUser': self._API_USER, - 'ApiPass': self._API_PASS + 'ApiPass': self._API_PASS, }, 'MediaID': video_id, 'mediaType': 0, @@ -107,7 +107,7 @@ class ToggleIE(InfoExtractor): info = self._download_json( 'http://tvpapi.as.tvinci.com/v2_9/gateways/jsonpostgw.aspx?m=GetMediaInfo', - video_id, 'Downloading video info json', data=json.dumps(params).encode('utf-8')) + video_id, 'Downloading video info json', data=json.dumps(params).encode()) title = info['MediaName'] @@ -122,8 +122,8 @@ class ToggleIE(InfoExtractor): if ext == 'm3u8': m3u8_formats = self._extract_m3u8_formats( video_url, video_id, ext='mp4', m3u8_id=vid_format, - note='Downloading %s m3u8 information' % vid_format, - errnote='Failed to download %s m3u8 information' % vid_format, + note=f'Downloading {vid_format} m3u8 information', + errnote=f'Failed to download {vid_format} m3u8 information', fatal=False) for f in m3u8_formats: # Apple FairPlay Streaming @@ -133,14 +133,14 @@ class ToggleIE(InfoExtractor): elif ext == 'mpd': formats.extend(self._extract_mpd_formats( video_url, video_id, mpd_id=vid_format, - note='Downloading %s MPD manifest' % vid_format, - errnote='Failed to download %s MPD manifest' % vid_format, + note=f'Downloading {vid_format} MPD manifest', + errnote=f'Failed to download {vid_format} MPD manifest', fatal=False)) elif ext == 'ism': formats.extend(self._extract_ism_formats( video_url, video_id, ism_id=vid_format, - note='Downloading %s ISM manifest' % vid_format, - errnote='Failed to download %s ISM manifest' % vid_format, + note=f'Downloading {vid_format} ISM manifest', + errnote=f'Failed to download {vid_format} ISM manifest', fatal=False)) elif ext == 'mp4': formats.append({ -- cgit v1.2.3