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
132.71k stars 10.07k forks source link

[Udemy] Unable to download JSON metadata: HTTP Error 403: Forbidden #16395

Closed cptflammin closed 6 years ago

cptflammin commented 6 years ago

Before submitting an issue make sure you have:

What is the purpose of your issue?

youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.05.01
[debug] Python version 2.7.15 (CPython) - Darwin-17.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0, ffprobe 4.0
[debug] Proxy map: {}
...
<end of log>

Get 403 on free and paid lessons. Cannot provide account credentials but can be reproduced with any free lesson.

youtube-dl --cookies ./udemy-cookies.txt -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s. %(title)s.%(ext)s' https://www.udemy.com/javascript-essentials/learn/v4

[udemy:course] javascript-essentials: Downloading webpage
[udemy:course] 707962: Enrolling in the course
[udemy:course] 707962: Downloading course curriculum
ERROR: 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.

Same error as reported here and there end of page, something may have changed in Udemy (new protection?) as full course download was working perfectly until now. Note: I experimented same issues user comments before upgrade (error : "ERROR : No video formats found") and after upgrade to latest getting HTTP Error 403: Forbidden)

enbima commented 6 years ago

Same problem here, cannot download some courses anymore with 403 Forbidden Error (they are paid and credentials are given). This suddenly happens for courses where the coach doesn't allow the manual download of a lecture. Courses where the manual download of a video is supported still works fine with youtube-dl.