summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/brainpop.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/brainpop.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/brainpop.py')
-rw-r--r--yt_dlp/extractor/brainpop.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/extractor/brainpop.py b/yt_dlp/extractor/brainpop.py
index 04b1dd8..df10299 100644
--- a/yt_dlp/extractor/brainpop.py
+++ b/yt_dlp/extractor/brainpop.py
@@ -52,8 +52,8 @@ class BrainPOPBaseIE(InfoExtractor):
'%s': {},
'ad_%s': {
'format_note': 'Audio description',
- 'source_preference': -2
- }
+ 'source_preference': -2,
+ },
}
for additional_key_format, additional_key_fields in additional_key_formats.items():
for key_quality, key_index in enumerate(('high', 'low')):
@@ -62,7 +62,7 @@ class BrainPOPBaseIE(InfoExtractor):
formats.extend(self._assemble_formats(data[full_key_index], full_key_index, display_id, token, {
'quality': -1 - key_quality,
**additional_key_fields,
- **extra_fields
+ **extra_fields,
}))
return formats
@@ -72,7 +72,7 @@ class BrainPOPBaseIE(InfoExtractor):
data=json.dumps({'username': username, 'password': password}).encode(),
headers={
'Content-Type': 'application/json',
- 'Referer': self._ORIGIN
+ 'Referer': self._ORIGIN,
}, note='Logging in', errnote='Unable to log in', expected_status=400)
status_code = int_or_none(login_res['status_code'])
if status_code != 1505:
@@ -131,12 +131,12 @@ class BrainPOPIE(BrainPOPBaseIE):
formats, subtitles = [], {}
formats.extend(self._extract_adaptive_formats(movie_feature_data, movie_feature_data.get('token', ''), display_id, '%s_v2', {
'language': movie_feature.get('language') or 'en',
- 'language_preference': 10
+ 'language_preference': 10,
}))
for lang, localized_feature in traverse_obj(movie_feature, 'localization', default={}, expected_type=dict).items():
formats.extend(self._extract_adaptive_formats(localized_feature, localized_feature.get('token', ''), display_id, '%s_v2', {
'language': lang,
- 'language_preference': -10
+ 'language_preference': -10,
}))
# TODO: Do localization fields also have subtitles?
@@ -145,7 +145,7 @@ class BrainPOPIE(BrainPOPBaseIE):
r'^subtitles_(?P<lang>\w+)$', name, 'subtitle metadata', default=None)
if lang and url:
subtitles.setdefault(lang, []).append({
- 'url': urljoin(self._CDN_URL, url)
+ 'url': urljoin(self._CDN_URL, url),
})
return {