mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-29 18:51:24 +01:00
Compare commits
No commits in common. "effa2ea391d9313fa2cce1f372426aa3ec131d5c" and "14f69f732c77ee25f967a54993aef73ed8e68ecc" have entirely different histories.
effa2ea391
...
14f69f732c
|
@ -3,28 +3,25 @@ import time
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .getcourseru import GetCourseRuIE
|
from .getcourseru import GetCourseRuIE
|
||||||
from ..utils import update_url_query, urlencode_postdata
|
from ..utils import urlencode_postdata, update_url_query
|
||||||
|
|
||||||
|
|
||||||
class AcademyMelIE(InfoExtractor):
|
class AcademyMelIE(InfoExtractor):
|
||||||
|
_TEST_EMAIL = 'meriat@jaga.email' # use this as username in the test/local_parameters.json if running the test
|
||||||
|
_TEST_PASSWORD = 'bBY-ccbp$8' # use this as password in the test/local_parameters.json if running the test
|
||||||
|
|
||||||
|
_LOGIN_URL = 'https://academymel.online/cms/system/login'
|
||||||
_NETRC_MACHINE = 'academymel'
|
_NETRC_MACHINE = 'academymel'
|
||||||
_VALID_URL = r'https?://academymel\.online/(?P<id>[^/?#]+)'
|
_VALID_URL = r'https?://academymel\.online/(?P<id>[^/?#]+)'
|
||||||
_LOGIN_URL = 'https://academymel.online/cms/system/login'
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://academymel.online/3video_1',
|
'url': 'http://academymel.online/3video_1',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '3video_1',
|
'id': '4885302',
|
||||||
'title': 'Промоуроки Академии МЕЛ',
|
'title': 'Промоуроки Академии МЕЛ',
|
||||||
},
|
'ext': 'mp4',
|
||||||
'playlist_count': 1,
|
'duration': 1693
|
||||||
'playlist': [{
|
}
|
||||||
'info_dict': {
|
|
||||||
'id': '4885302',
|
|
||||||
'ext': 'mp4',
|
|
||||||
'title': 'Промоуроки Академии МЕЛ',
|
|
||||||
'duration': 1693
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _perform_login(self, username, password):
|
def _perform_login(self, username, password):
|
||||||
|
|
|
@ -3,20 +3,25 @@ from ..utils import int_or_none, traverse_obj, url_or_none
|
||||||
|
|
||||||
|
|
||||||
class GetCourseRuIE(InfoExtractor):
|
class GetCourseRuIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://[^.]+\.getcourse\.ru/sign-player/?\?(?:[^#]+&)?json=(?P<id>[^#&]+)'
|
_NETRC_MACHINE = 'getcourseru'
|
||||||
|
_VALID_URL = r'https?://[^.]+\.getcourse\.ru/sign-player/\?json=(?P<id>[^#]+)'
|
||||||
|
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://player02.getcourse.ru/sign-player/?json=eyJ2aWRlb19oYXNoIjoiMTkwYmRmOTNmMWIyOTczNTMwOTg1M2E3YTE5ZTI0YjMiLCJ1c2VyX2lkIjozNTk1MjUxODMsInN1Yl9sb2dpbl91c2VyX2lkIjpudWxsLCJsZXNzb25faWQiOm51bGwsImlwIjoiNDYuMTQyLjE4Mi4yNDciLCJnY19ob3N0IjoiYWNhZGVteW1lbC5vbmxpbmUiLCJ0aW1lIjoxNzA1MjcwMzU0LCJwYXlsb2FkIjoidV8zNTk1MjUxODMiLCJ1aV9sYW5ndWFnZSI6InJ1IiwiaXNfaGF2ZV9jdXN0b21fc3R5bGUiOnRydWV9&s=031d44cc738c58863a436d98f1032132&vh-static-feature=zigzag',
|
'url': 'http://player02.getcourse.ru/sign-player/?json=eyJ2aWRlb19oYXNoIjoiMTkwYmRmOTNmMWIyOTczNTMwOTg1M2E3YTE5ZTI0YjMiLCJ1c2VyX2lkIjozNTk1MjUxODMsInN1Yl9sb2dpbl91c2VyX2lkIjpudWxsLCJsZXNzb25faWQiOm51bGwsImlwIjoiNDYuMTQyLjE4Mi4yNDciLCJnY19ob3N0IjoiYWNhZGVteW1lbC5vbmxpbmUiLCJ0aW1lIjoxNzA1MjY2Njc2LCJwYXlsb2FkIjoidV8zNTk1MjUxODMiLCJ1aV9sYW5ndWFnZSI6InJ1IiwiaXNfaGF2ZV9jdXN0b21fc3R5bGUiOnRydWV9&s=0c5e0c6aef19da36add3135a162b8eba&vh-static-feature=zigzag',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '4885302',
|
'id': '4885302',
|
||||||
'title': '190bdf93f1b29735309853a7a19e24b3',
|
'title': '190bdf93f1b29735309853a7a19e24b3',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'duration': 1693
|
'duration': 1693
|
||||||
|
# note: the original URL is necessary to obtain an up-to-date URL, because the URL is always changing
|
||||||
},
|
},
|
||||||
'skip': 'JWT expired',
|
'skip': 'Requires authentication',
|
||||||
|
'note': 'This extractor is used by AcademyMel extractor, which has a login feature'
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
webpage = self._download_webpage(url, None, 'Downloading player page')
|
webpage = self._download_webpage(url, None, 'Downloading player page')
|
||||||
|
|
||||||
window_configs = self._search_json(
|
window_configs = self._search_json(
|
||||||
r'window\.configs\s*=', webpage, 'config', None)
|
r'window\.configs\s*=', webpage, 'config', None)
|
||||||
video_id = str(window_configs['videoId'])
|
video_id = str(window_configs['videoId'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user