diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
commit | fd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch) | |
tree | e1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/teachertube.py | |
parent | Releasing progress-linux version 2024.05.27-1~progress7.99u1. (diff) | |
download | yt-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/teachertube.py')
-rw-r--r-- | yt_dlp/extractor/teachertube.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/yt_dlp/extractor/teachertube.py b/yt_dlp/extractor/teachertube.py index 7402409..4c26d31 100644 --- a/yt_dlp/extractor/teachertube.py +++ b/yt_dlp/extractor/teachertube.py @@ -50,7 +50,7 @@ class TeacherTubeIE(InfoExtractor): r'<div\b[^>]+\bclass=["\']msgBox error[^>]+>([^<]+)', webpage, 'error', default=None) if error: - raise ExtractorError('%s said: %s' % (self.IE_NAME, error), expected=True) + raise ExtractorError(f'{self.IE_NAME} said: {error}', expected=True) title = self._html_search_meta('title', webpage, 'title', fatal=True) TITLE_SUFFIX = ' - TeacherTube' @@ -70,7 +70,7 @@ class TeacherTubeIE(InfoExtractor): formats = [ { 'url': media_url, - 'quality': quality(determine_ext(media_url)) + 'quality': quality(determine_ext(media_url)), } for media_url in set(media_urls) ] @@ -102,7 +102,7 @@ class TeacherTubeUserIE(InfoExtractor): _TEST = { 'url': 'http://www.teachertube.com/user/profile/rbhagwati2', 'info_dict': { - 'id': 'rbhagwati2' + 'id': 'rbhagwati2', }, 'playlist_mincount': 179, } @@ -115,10 +115,10 @@ class TeacherTubeUserIE(InfoExtractor): webpage = self._download_webpage(url, user_id) urls.extend(re.findall(self._MEDIA_RE, webpage)) - pages = re.findall(r'/ajax-user/user-videos/%s\?page=([0-9]+)' % user_id, webpage)[:-1] + pages = re.findall(rf'/ajax-user/user-videos/{user_id}\?page=([0-9]+)', webpage)[:-1] for p in pages: - more = 'http://www.teachertube.com/ajax-user/user-videos/%s?page=%s' % (user_id, p) - webpage = self._download_webpage(more, user_id, 'Downloading page %s/%s' % (p, len(pages))) + more = f'http://www.teachertube.com/ajax-user/user-videos/{user_id}?page={p}' + webpage = self._download_webpage(more, user_id, f'Downloading page {p}/{len(pages)}') video_urls = re.findall(self._MEDIA_RE, webpage) urls.extend(video_urls) |