summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/manyvids.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/manyvids.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/manyvids.py')
-rw-r--r--yt_dlp/extractor/manyvids.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/manyvids.py b/yt_dlp/extractor/manyvids.py
index 2aa3a3c..8caa8f8 100644
--- a/yt_dlp/extractor/manyvids.py
+++ b/yt_dlp/extractor/manyvids.py
@@ -44,7 +44,7 @@ class ManyVidsIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
- real_url = 'https://www.manyvids.com/video/%s/gtm.js' % (video_id, )
+ real_url = f'https://www.manyvids.com/video/{video_id}/gtm.js'
try:
webpage = self._download_webpage(real_url, video_id)
except Exception:
@@ -75,7 +75,7 @@ class ManyVidsIE(InfoExtractor):
def mung_title(s):
if uploader:
- s = re.sub(r'^\s*%s\s+[|-]' % (re.escape(uploader), ), '', s)
+ s = re.sub(rf'^\s*{re.escape(uploader)}\s+[|-]', '', s)
return txt_or_none(s)
title = (
@@ -106,7 +106,7 @@ class ManyVidsIE(InfoExtractor):
'vid': video_id,
}), headers={
'Referer': url,
- 'X-Requested-With': 'XMLHttpRequest'
+ 'X-Requested-With': 'XMLHttpRequest',
})
formats = []
@@ -138,7 +138,7 @@ class ManyVidsIE(InfoExtractor):
def get_likes():
likes = self._search_regex(
- r'''(<a\b[^>]*\bdata-id\s*=\s*(['"])%s\2[^>]*>)''' % (video_id, ),
+ rf'''(<a\b[^>]*\bdata-id\s*=\s*(['"]){video_id}\2[^>]*>)''',
webpage, 'likes', default='')
likes = extract_attributes(likes)
return int_or_none(likes.get('data-likes'))