From 8781ffb4f188267a382b18d3109a6f2f9029ecca Mon Sep 17 00:00:00 2001 From: Hugo Azevedo Date: Tue, 9 Apr 2024 20:03:04 -0700 Subject: [PATCH] fixing parsing bug --- .fleet/run.json | 11 +++++++++++ yt_dlp/extractor/alura.py | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .fleet/run.json diff --git a/.fleet/run.json b/.fleet/run.json new file mode 100644 index 000000000..50126dbc2 --- /dev/null +++ b/.fleet/run.json @@ -0,0 +1,11 @@ +{ + "configurations": [ + { + "type": "python", + "name": "Python configuration", + "file": "yt_dlp", + "arguments": ["--cookies", "cookies.txt", "https://cursos.alura.com.br/course/kubernetes-pods-services-configmap"], + }, + + ] +} \ No newline at end of file diff --git a/yt_dlp/extractor/alura.py b/yt_dlp/extractor/alura.py index bfe066bc6..b785c62c3 100644 --- a/yt_dlp/extractor/alura.py +++ b/yt_dlp/extractor/alura.py @@ -39,7 +39,7 @@ class AluraIE(InfoExtractor): def _real_extract(self, url): - course, video_id = self._match_valid_url(url) + course, video_id = self._match_valid_url(url).group('course_name', 'id') video_url = self._VIDEO_URL % (course, video_id) video_dict = self._download_json(video_url, video_id, 'Searching for videos') @@ -52,7 +52,7 @@ class AluraIE(InfoExtractor): formats = [] for video_obj in video_dict: - video_url_m3u8 = video_obj.get('link') + video_url_m3u8 = video_obj.get('mp4') video_format = self._extract_m3u8_formats( video_url_m3u8, None, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)