]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/lecturio.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / lecturio.py
index 90f0268d7b34b23e936972a920edc359e9e0e83b..4cfb8722418b79dbf89d9eebb4dc5bf95bef5b20 100644 (file)
@@ -49,7 +49,7 @@ def is_logged(url_handle):
             r'(?s)<ul[^>]+class=["\']error_list[^>]+>(.+?)</ul>', response,
             'errors', default=None)
         if errors:
-            raise ExtractorError('Unable to login: %s' % errors, expected=True)
+            raise ExtractorError(f'Unable to login: {errors}', expected=True)
         raise ExtractorError('Unable to log in')
 
 
@@ -130,7 +130,7 @@ def _real_extract(self, url):
             f = {
                 'url': file_url,
                 'format_id': label,
-                'filesize': float_or_none(filesize, invscale=1000)
+                'filesize': float_or_none(filesize, invscale=1000),
             }
             if label:
                 mobj = re.match(r'(\d+)p\s*\(([^)]+)\)', label)
@@ -200,7 +200,7 @@ def _real_extract(self, url):
             if lecture_url:
                 lecture_url = urljoin(url, lecture_url)
             else:
-                lecture_url = 'https://app.lecturio.com/#/lecture/c/%s/%s' % (course_id, lecture_id)
+                lecture_url = f'https://app.lecturio.com/#/lecture/c/{course_id}/{lecture_id}'
             entries.append(self.url_result(
                 lecture_url, ie=LecturioIE.ie_key(), video_id=lecture_id))
         return self.playlist_result(