summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/samplefocus.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/samplefocus.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/samplefocus.py')
-rw-r--r--yt_dlp/extractor/samplefocus.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/samplefocus.py b/yt_dlp/extractor/samplefocus.py
index e9f5c22..36ceb02 100644
--- a/yt_dlp/extractor/samplefocus.py
+++ b/yt_dlp/extractor/samplefocus.py
@@ -28,10 +28,10 @@ class SampleFocusIE(InfoExtractor):
},
}, {
'url': 'https://samplefocus.com/samples/dababy-style-bass-808',
- 'only_matching': True
+ 'only_matching': True,
}, {
'url': 'https://samplefocus.com/samples/young-chop-kick',
- 'only_matching': True
+ 'only_matching': True,
}]
def _real_extract(self, url):
@@ -76,7 +76,7 @@ class SampleFocusIE(InfoExtractor):
def extract_count(klass):
return int_or_none(self._html_search_regex(
- r'<span[^>]+class=(?:["\'])?%s-count[^>]*>(\d+)' % klass,
+ rf'<span[^>]+class=(?:["\'])?{klass}-count[^>]*>(\d+)',
webpage, klass, fatal=False))
return {
@@ -90,7 +90,7 @@ class SampleFocusIE(InfoExtractor):
r'<a[^>]+href=(["\'])/license\1[^>]*>(?P<license>[^<]+)<',
webpage, 'license', fatal=False, group='license'),
'uploader_id': uploader_id,
- 'like_count': extract_count('sample-%s-favorites' % sample_id),
+ 'like_count': extract_count(f'sample-{sample_id}-favorites'),
'comment_count': extract_count('comments'),
'comments': comments,
'categories': categories,