]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/alura.py
[ie/floatplane] Add extractors (#8639)
[yt-dlp.git] / yt_dlp / extractor / alura.py
index f5325de2f26538a4ab2e8892abb886c4b50d3748..bfe066bc68515cf1b6c4ec0a72a973e77bc378d2 100644 (file)
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
 import re
 
 from .common import InfoExtractor
@@ -66,22 +63,13 @@ def _real_extract(self, url):
                             f['height'] = int('720' if m.group('res') == 'hd' else '480')
                 formats.extend(video_format)
 
-            self._sort_formats(formats)
-
             return {
                 'id': video_id,
                 'title': video_title,
                 "formats": formats
             }
 
-    def _real_initialize(self):
-        self._login()
-
-    def _login(self):
-        username, password = self._get_login_info()
-        if username is None:
-            return
-        pass
+    def _perform_login(self, username, password):
 
         login_page = self._download_webpage(
             self._LOGIN_URL, None, 'Downloading login popup')
@@ -123,7 +111,7 @@ def is_logged(webpage):
             raise ExtractorError('Unable to log in')
 
 
-class AluraCourseIE(AluraIE):
+class AluraCourseIE(AluraIE):  # XXX: Do not subclass from concrete IE
 
     _VALID_URL = r'https?://(?:cursos\.)?alura\.com\.br/course/(?P<id>[^/]+)'
     _LOGIN_URL = 'https://cursos.alura.com.br/loginForm?urlAfterLogin=/loginForm'