youtube-dl: [Udemy] Unable to extract course id
Checklist
- I’m reporting a broken site support issue
- I’ve verified that I’m running youtube-dl version 2021.12.17
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Verbose log
youtube-dl --cookies c:\udemy_cookies.txt -o 'E:/Udemy/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/typescript-full/ --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'c:\\udemy_cookies.txt', '-o', 'E:/Udemy/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s', 'https://www.udemy.com/typescript-full/', '--verbose']
[debug] Encodings: locale cp1251, fs utf-8, out utf-8, pref cp1251
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.9.6 (CPython) - Windows-10-10.0.19044-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[udemy:course] typescript-full: Downloading webpage
ERROR: Unable to extract course id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "c:\python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 815, in wrapper
return func(self, *args, **kwargs)
File "c:\python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 836, in __extract_info
ie_result = ie.extract(url)
File "c:\python39\lib\site-packages\youtube_dl\extractor\common.py", line 534, in extract
ie_result = self._real_extract(url)
File "c:\python39\lib\site-packages\youtube_dl\extractor\udemy.py", line 442, in _real_extract
course_id, title = self._extract_course_info(webpage, course_path)
File "c:\python39\lib\site-packages\youtube_dl\extractor\udemy.py", line 78, in _extract_course_info
course_id = course.get('id') or self._search_regex(
File "c:\python39\lib\site-packages\youtube_dl\extractor\common.py", line 1012, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract course id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Description
I am trying to download a paid course from udemy.com
And when I try use login/pass - I getting this: ERROR: Unable to download webpage: HTTP Error 403: Forbidden
So I tried use --cookies option and getting another error (above).
I’m export udemy_cookies.txt form browser by this chrome extention:
https://chrome.google.com/webstore/detail/get-cookiestxt/bgaddhkoddajcdgocldbbfleckgcbcid
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (6 by maintainers)
Try
curl -c udemy_cookies.txt "https://www.udemy.com/typescript-full/".But your observation may be enough. This patch would find the course ID, though obviously there may be other changes if the course ID is being sent differently:
thank you @pashakiz and @dirkf . I was able to get it working as a result of your answers.
Great! It works now with this patch! Thank you!
But I saw in browser and found this (data-clp-course-id)
and this (courseId)
Will it help?