ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.89k stars 10k forks source link

Cannot download from Udemy (4/3/2019) #20548

Closed isaaci closed 5 years ago

isaaci commented 5 years ago

Used to work but it seems a popup happens somewhere along the way. here is the debug output:

D:\Udemy - Youtube>youtube-dl -u username -p password https://www.udemy.com/aws-certified-solutions-architect-associate --verbose [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.udemy.com/aws-certified-solutions-architect-associate', '--verbose'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2019.04.01 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134 [debug] exe versions: ffmpeg N-86755-g0780ad9 [debug] Proxy map: {} [udemy:course] Downloading login popup [udemy:course] Logging in [udemy:course] aws-certified-solutions-architect-associate: Downloading webpage [udemy:course] 362328: Downloading course curriculum [download] Downloading playlist: 362328 [udemy:course] playlist 362328: Collected 207 video ids (downloading 207 of them) [download] Downloading video 1 of 207 [udemy] Downloading login popup [udemy] 13885822: 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; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp48z7ci11\build\youtube_dl\YoutubeDL.py", line 794, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp48z7ci11\build\youtube_dl\extractor\common.py", line 529, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp48z7ci11\build\youtube_dl\extractor\udemy.py", line 216, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp48z7ci11\build\youtube_dl\extractor\udemy.py", line 79, in _extract_course_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp48z7ci11\build\youtube_dl\extractor\common.py", line 1004, in _search_regex 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; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

getrdone commented 5 years ago

I was just about to post the same issue except on linux (deepin linux) using youtube-dl 2019-04-01. I tried the --cookie method and the -u username -p password methods; neither work.

--- COOKIE METHOD DEBUG INFO --- ./youtube-dl --cookies ./udemy/cookies.txt https://www.udemy.com/copywriting-secrets/ --verbose [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--cookies', u'./udemy/cookies.txt', u'https://www.udemy.com/copywriting-secrets/', u'--verbose'] [debug] Encodings: locale UTF-8, fs UTF-8, out None, pref UTF-8 [debug] youtube-dl version 2019.04.01 [debug] Python version 2.7.15 (CPython) - Linux-4.15.0-29deepin-generic-x86_64-with-Deepin-15.9.3-unstable [debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2, phantomjs 2.1.1, rtmpdump 2.4 [debug] Proxy map: {} ERROR: Unable to extract course id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "./youtube-dl/youtube_dl/YoutubeDL.py", line 794, in extract_info ie_result = ie.extract(url) File "./youtube-dl/youtube_dl/extractor/common.py", line 529, in extract ie_result = self._real_extract(url) File "./youtube-dl/youtube_dl/extractor/udemy.py", line 216, in _real_extract courseid, = self._extract_course_info(webpage, lecture_id) File "./youtube-dl/youtube_dl/extractor/udemy.py", line 79, in _extract_course_info r'data-course-id="\'', webpage, 'course id') File "./youtube-dl/youtube_dl/extractor/common.py", line 1004, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name) RegexNotFoundError: Unable to extract course id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

--- USERNAME AND PASSWORD METHOD DEBUG INFO --- user@domain:~/Videos$ youtube-dl -u username -p password -f 'best' https://www.udemy.com/copywriting-secrets/ -o '%(playlist)s/%(chapter_number)s. %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s' --verbose [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-f', 'best', 'https://www.udemy.com/copywriting-secrets/', '-o', '%(playlist)s/%(chapter_number)s. %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s', '--verbose'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2018.09.10 [debug] Python version 3.6.5 (CPython) - Linux-4.15.0-29deepin-generic-x86_64-with-Deepin-15.9.3-unstable [debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2, phantomjs 2.1.1, rtmpdump 2.4 [debug] Proxy map: {} [udemy:course] Downloading login popup ERROR: Unable to download webpage: HTTP Error 403: Unauthorized (caused by <HTTPError 403: 'Unauthorized'>); 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. File "/usr/lib/python3/dist-packages/youtube_dl/extractor/common.py", line 599, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/lib/python3/dist-packages/youtube_dl/YoutubeDL.py", line 2211, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp)

isaaci commented 5 years ago

This issue doesn't seems to be duplicate...