summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/drtv.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
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/drtv.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/drtv.py')
-rw-r--r--yt_dlp/extractor/drtv.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/yt_dlp/extractor/drtv.py b/yt_dlp/extractor/drtv.py
index 2a6e337..32b6845 100644
--- a/yt_dlp/extractor/drtv.py
+++ b/yt_dlp/extractor/drtv.py
@@ -220,7 +220,7 @@ class DRTVIE(InfoExtractor):
lang = sub_track.get('language') or 'da'
subtitles.setdefault(self.SUBTITLE_LANGS.get(lang, lang) + subtitle_suffix, []).append({
'url': sub_track['link'],
- 'ext': mimetype2ext(sub_track.get('format')) or 'vtt'
+ 'ext': mimetype2ext(sub_track.get('format')) or 'vtt',
})
if not formats and traverse_obj(item, ('season', 'customFields', 'IsGeoRestricted')):
@@ -284,14 +284,14 @@ class DRTVLiveIE(InfoExtractor):
if not stream_path:
continue
stream_url = update_url_query(
- '%s/%s' % (server, stream_path), {'b': ''})
+ f'{server}/{stream_path}', {'b': ''})
if link_type == 'HLS':
formats.extend(self._extract_m3u8_formats(
stream_url, channel_id, 'mp4',
m3u8_id=link_type, fatal=False, live=True))
elif link_type == 'HDS':
formats.extend(self._extract_f4m_formats(update_url_query(
- '%s/%s' % (server, stream_path), {'hdcore': '3.7.0'}),
+ f'{server}/{stream_path}', {'hdcore': '3.7.0'}),
channel_id, f4m_id=link_type, fatal=False))
return {
@@ -317,7 +317,7 @@ class DRTVSeasonIE(InfoExtractor):
'season_number': 2008,
'alt_title': 'Season 2008',
},
- 'playlist_mincount': 8
+ 'playlist_mincount': 8,
}, {
'url': 'https://www.dr.dk/drtv/saeson/frank-and-kastaniegaarden_8761',
'info_dict': {
@@ -328,7 +328,7 @@ class DRTVSeasonIE(InfoExtractor):
'season_number': 2009,
'alt_title': 'Season 2009',
},
- 'playlist_mincount': 19
+ 'playlist_mincount': 19,
}]
def _real_extract(self, url):
@@ -356,7 +356,7 @@ class DRTVSeasonIE(InfoExtractor):
'alt_title': traverse_obj(data, ('entries', 0, 'item', 'contextualTitle')),
'series': traverse_obj(data, ('entries', 0, 'item', 'title')),
'entries': entries,
- 'season_number': traverse_obj(data, ('entries', 0, 'item', 'seasonNumber'))
+ 'season_number': traverse_obj(data, ('entries', 0, 'item', 'seasonNumber')),
}
@@ -373,7 +373,7 @@ class DRTVSeriesIE(InfoExtractor):
'series': 'Frank & Kastaniegaarden',
'alt_title': '',
},
- 'playlist_mincount': 15
+ 'playlist_mincount': 15,
}]
def _real_extract(self, url):
@@ -387,7 +387,7 @@ class DRTVSeriesIE(InfoExtractor):
'title': season.get('title'),
'alt_title': season.get('contextualTitle'),
'series': traverse_obj(data, ('entries', 0, 'item', 'title')),
- 'season_number': traverse_obj(data, ('entries', 0, 'item', 'seasonNumber'))
+ 'season_number': traverse_obj(data, ('entries', 0, 'item', 'seasonNumber')),
} for season in traverse_obj(data, ('entries', 0, 'item', 'show', 'seasons', 'items'))]
return {
@@ -397,5 +397,5 @@ class DRTVSeriesIE(InfoExtractor):
'title': traverse_obj(data, ('entries', 0, 'item', 'title')),
'alt_title': traverse_obj(data, ('entries', 0, 'item', 'contextualTitle')),
'series': traverse_obj(data, ('entries', 0, 'item', 'title')),
- 'entries': entries
+ 'entries': entries,
}