summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/myspace.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/myspace.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/myspace.py')
-rw-r--r--yt_dlp/extractor/myspace.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/yt_dlp/extractor/myspace.py b/yt_dlp/extractor/myspace.py
index 3451098..fa2ef14 100644
--- a/yt_dlp/extractor/myspace.py
+++ b/yt_dlp/extractor/myspace.py
@@ -95,17 +95,17 @@ class MySpaceIE(InfoExtractor):
if is_song:
# songs don't store any useful info in the 'context' variable
song_data = self._search_regex(
- r'''<button.*data-song-id=(["\'])%s\1.*''' % video_id,
+ rf'''<button.*data-song-id=(["\']){video_id}\1.*''',
webpage, 'song_data', default=None, group=0)
if song_data is None:
# some songs in an album are not playable
self.report_warning(
- '%s: No downloadable song on this page' % video_id)
+ f'{video_id}: No downloadable song on this page')
return
def search_data(name):
return self._search_regex(
- r'''data-%s=([\'"])(?P<data>.*?)\1''' % name,
+ rf'''data-{name}=([\'"])(?P<data>.*?)\1''',
song_data, name, default='', group='data')
formats = formats_from_stream_urls(
search_data('stream-url'), search_data('hls-stream-url'),
@@ -114,10 +114,10 @@ class MySpaceIE(InfoExtractor):
vevo_id = search_data('vevo-id')
youtube_id = search_data('youtube-id')
if vevo_id:
- self.to_screen('Vevo video detected: %s' % vevo_id)
- return self.url_result('vevo:%s' % vevo_id, ie='Vevo')
+ self.to_screen(f'Vevo video detected: {vevo_id}')
+ return self.url_result(f'vevo:{vevo_id}', ie='Vevo')
elif youtube_id:
- self.to_screen('Youtube video detected: %s' % youtube_id)
+ self.to_screen(f'Youtube video detected: {youtube_id}')
return self.url_result(youtube_id, ie='Youtube')
else:
raise ExtractorError(
@@ -181,7 +181,7 @@ class MySpaceAlbumIE(InfoExtractor):
tracks_paths = re.findall(r'"music:song" content="(.*?)"', webpage)
if not tracks_paths:
raise ExtractorError(
- '%s: No songs found, try using proxy' % display_id,
+ f'{display_id}: No songs found, try using proxy',
expected=True)
entries = [
self.url_result(t_path, ie=MySpaceIE.ie_key())