summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/videopress.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/videopress.py')
-rw-r--r--yt_dlp/extractor/videopress.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/videopress.py b/yt_dlp/extractor/videopress.py
index 0734aee..d3c9c8e 100644
--- a/yt_dlp/extractor/videopress.py
+++ b/yt_dlp/extractor/videopress.py
@@ -14,7 +14,7 @@ from ..utils import (
class VideoPressIE(InfoExtractor):
_ID_REGEX = r'[\da-zA-Z]{8}'
_PATH_REGEX = r'video(?:\.word)?press\.com/embed/'
- _VALID_URL = r'https?://%s(?P<id>%s)' % (_PATH_REGEX, _ID_REGEX)
+ _VALID_URL = rf'https?://{_PATH_REGEX}(?P<id>{_ID_REGEX})'
_EMBED_REGEX = [rf'<iframe[^>]+src=["\'](?P<url>(?:https?://)?{_PATH_REGEX}{_ID_REGEX})']
_TESTS = [{
'url': 'https://videopress.com/embed/kUJmAcSf',
@@ -44,7 +44,7 @@ class VideoPressIE(InfoExtractor):
query = random_birthday('birth_year', 'birth_month', 'birth_day')
query['fields'] = 'description,duration,file_url_base,files,height,original,poster,rating,title,upload_date,width'
video = self._download_json(
- 'https://public-api.wordpress.com/rest/v1.1/videos/%s' % video_id,
+ f'https://public-api.wordpress.com/rest/v1.1/videos/{video_id}',
video_id, query=query)
title = video['title']
@@ -63,7 +63,7 @@ class VideoPressIE(InfoExtractor):
if ext in ('mp4', 'ogg'):
formats.append({
'url': urljoin(base_url, path),
- 'format_id': '%s-%s' % (format_id, ext),
+ 'format_id': f'{format_id}-{ext}',
'ext': determine_ext(path, ext),
'quality': quality(format_id),
})