Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udemy download is not working anymore #26600

Open
mumi opened this issue Sep 16, 2020 · 3 comments
Open

Udemy download is not working anymore #26600

mumi opened this issue Sep 16, 2020 · 3 comments

Comments

@mumi
Copy link

@mumi mumi commented Sep 16, 2020

Checklist

  • [ X ] I've verified that I'm running youtube-dl version 2020.09.14
  • [ X ] I've checked that all provided URLs are alive and playable in a browser
  • [ X ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • [ X ] I've searched the bugtracker for similar bug reports including closed ones
  • [ X ] I've read bugs section in FAQ

Verbose log

C:\Users\name\Downloads>youtube-dl -v --write-sub --sub-lang en --cookies cookies.txt -f best https://www.udemy.com/course/web-developer-build-fiverr-twitter-and-mvp-with-nodejs/ -o "%(playlist)s/%(chapter_number)s. %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--write-sub', '--sub-lang', 'en', '--cookies', 'cookies.txt', '-f', 'best', 'https://www.udemy.com/course/web-developer-build-fiverr-twitter-and-mvp-with-nodejs/', '-o', '%(playlist)s/%(chapter_number)s. %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2020.09.14
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[udemy:course] course: Downloading webpage
[udemy:course] 1169378: Downloading course curriculum
[download] Downloading playlist: 1169378
[udemy:course] playlist 1169378: Collected 84 video ids (downloading 84 of them)
[download] Downloading video 1 of 84
[udemy] 7055360: Downloading webpage
[udemy] 7055360: Downloading lecture JSON
ERROR: Course 10543 is not free. You have to pay for it before you can download. Use this URL to confirm purchase: https://www.udemy.com/cart/checkout/express/course/10543/
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 222, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 116, in _download_lecture
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 167, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 892, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 870, in _download_json_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 135, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 660, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 645, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by HTTPError()); 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\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 222, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 116, in _download_lecture
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 167, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 892, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 870, in _download_json_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 135, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 660, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 645, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by HTTPError()); 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.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 226, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\udemy.py", line 97, in _enroll_course
youtube_dl.utils.ExtractorError: Course 10543 is not free. You have to pay for it before you can download. Use this URL to confirm purchase: https://www.udemy.com/cart/checkout/express/course/10543/

Description

The udemy download function doesn't work anymore, I'm using the cookie authentication. The message at the end is: Course 10543 is not free. You have to pay for it before you can download. Use this URL to confirm purchase: https://www.udemy.com/cart/checkout/express/course/10543/

@m3tr0m3tr0
Copy link

@m3tr0m3tr0 m3tr0m3tr0 commented Sep 16, 2020

Can I add that using user and password option are not working either. Please see below (I've purchased the course with the credentials I'm giving to youtube-dl):

youtube-dl --verbose -u goodemailaddress@gmail.com -p goodpassword-o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s' https://www.udemy.com/course/designing-for-3d-printing-with-fusion-360 [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'-o', u'%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s', u'https://www.udemy.com/course/designing-for-3d-printing-with-fusion-360'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2020.09.14 [debug] Python version 2.7.12 (CPython) - Linux-4.4.59+-x86_64-with-glibc2.2.5 [debug] exe versions: ffmpeg 2.7.1 [debug] Proxy map: {} [udemy:course] Downloading login popup ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by HTTPError()); 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. File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2238, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

I'm running latest (2020.09.14) version on a Synology NAS with Linux-4.4.59+-x86_64-with-glibc2.2.5

Thanks!

@nnsense
Copy link

@nnsense nnsense commented Oct 9, 2020

This is a known issue unfortunately, search other bugs about udemy and you'll find a couple very similar. udemy has changed the page format, there's no way to circumvent this with any argument or modified link (like removing /course/), youtube-dl's udemy extractor is searching using a regex that is not valid any more, and also some links used to search have been changed, resulting in the errors above (page not found, or the course is not free, etc)

@Galaxy0419
Copy link

@Galaxy0419 Galaxy0419 commented Oct 13, 2020

Same here, BTW cookies are not working as well. Maybe we can borrow some code from https://github.com/r0oth3x49/udemy-dl?

Logs:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-F', 'https://www.udemy.com/course/blendertutorial', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.8.6 (CPython) - Linux-5.8.14-arch1-1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[udemy:course] Downloading login popup
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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.8/site-packages/youtube_dl/extractor/common.py", line 632, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 2238, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.