mirror of https://github.com/yt-dlp/yt-dlp.git
- formatting
This commit is contained in:
parent
2adf91f94f
commit
39672cdc79
|
@ -30,17 +30,14 @@ class AluraIE(InfoExtractor):
|
|||
'ext': 'mp4',
|
||||
'title': 'Referências, ref-set e alter'
|
||||
},
|
||||
'skip': 'Requires alura account credentials',
|
||||
},
|
||||
'skip': 'Requires alura account credentials'},
|
||||
{
|
||||
# URL without video
|
||||
'url': 'https://cursos.alura.com.br/course/clojure-mutabilidade-com-atoms-e-refs/task/60098',
|
||||
'only_matching': True,
|
||||
},
|
||||
'only_matching': True},
|
||||
{
|
||||
'url': 'https://cursos.alura.com.br/course/fundamentos-market-digital/task/55219',
|
||||
'only_matching': True,
|
||||
}
|
||||
'only_matching': True}
|
||||
]
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
@ -152,9 +149,21 @@ class AluraCourseIE(AluraIE):
|
|||
page_url = urljoin(url, path)
|
||||
section_path = self._download_webpage(page_url, course_path)
|
||||
for path_video in re.findall(r'<a\b(?=[^>]* class="[^"]*(?<=[" ])task-menu-nav-item-link-VIDEO[" ])(?=[^>]* href="([^"]*))', section_path):
|
||||
chapter = clean_html(self._search_regex(r'<h3[^>]+class=(["\'])task-menu-section-title-text\1[^>]*>(?P<chapter>[^<]+)',section_path, 'chapter', group='chapter'))
|
||||
chapter_number = int_or_none(self._search_regex(r'<span[^>]+class=(["\'])task-menu-section-title-number[^>]*>(.*?)<strong>(?P<chapter_number>[^<]+)</strong>',section_path, 'chapter number', group='chapter_number'))
|
||||
chapter = clean_html(
|
||||
self._search_regex(
|
||||
r'<h3[^>]+class=(["\'])task-menu-section-title-text\1[^>]*>(?P<chapter>[^<]+)',
|
||||
section_path,
|
||||
'chapter',
|
||||
group='chapter'))
|
||||
|
||||
chapter_number = int_or_none(
|
||||
self._search_regex(
|
||||
r'<span[^>]+class=(["\'])task-menu-section-title-number[^>]*>(.*?)<strong>(?P<chapter_number>[^<]+)</strong>',
|
||||
section_path,
|
||||
'chapter number',
|
||||
group='chapter_number'))
|
||||
video_url = urljoin(url, path_video)
|
||||
|
||||
entry = {
|
||||
'_type': 'url_transparent',
|
||||
'id': self._match_id(video_url),
|
||||
|
|
Loading…
Reference in New Issue