Closed ghost closed 7 years ago
Carefully read new issue template and provide all requested information.
This course is not free. Have you purchased it in the first place? How did you export cookies?
of course I've bought it. exported using this: https://addons.mozilla.org/en-US/firefox/addon/export-cookies/
the cookies are fine
For any further investigations you must provide account credentials.
You don't need any account credentials to test this, the same error occurs with free courses: (Example) https://www.udemy.com/learn-level-design-unity-basics-in-under-2-hours/
"C:\Program Files\MPV\youtube-dl.exe" --output "B:\CG\%(playlist)s\%(playlist)s_%(playlist_index)s_%(title)s.%(ext)s" --cookies "C:\Program Files\MPV\cookies.txt" --all-subs --embed-subs --verbose -f=bestvideo+bestaudio/best https://www.udemy.com/learn-level-design-unity-basics-in-under-2-hours/
[debug] System config: []
[debug] User config: ['--no-mtime']
[debug] Custom config: []
[debug] Command-line args: ['--output', 'B:\\CG\\%(playlist)s\\%(playlist)s_%(playlist_index)s_%(title)s.%(ext)s', '--cookies', 'C:\\Program Files\\MPV\\cookies.txt', '--all-subs', '--embed-subs', '--verbose', '-f=bestvideo+bestaudio/best', 'https://www.udemy.com/learn-level-design-unity-basics-in-under-2-hours/']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.05.09
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: ffmpeg N-82117-gc117343, ffprobe N-79000-g66edd86, rtmpdump 2.3
[debug] Proxy map: {}
[udemy:course] learn-level-design-unity-basics-in-under-2-hours: Downloading webpage
[udemy:course] 269: Enrolling in the course
[udemy:course] 269: 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.
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpup5muf90\build\youtube_dl\extractor\common.py", line 502, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpup5muf90\build\youtube_dl\YoutubeDL.py", line 2106, 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
Most likely your cookie file is invalid. Valid cookie:
> py -2.7 .\youtube_dl\__main__.py --cookies 'C:/Users/dst/Downloads/cookies.txt' https://www.udemy.com/learn-level-design-unity-basics-in-under-2-hours/
[udemy:course] learn-level-design-unity-basics-in-under-2-hours: Downloading webpage
[udemy:course] 1074250: Downloading course curriculum
[download] Downloading playlist: Learn Level Design: Unity Basics in Under 2 Hours
[udemy:course] playlist Learn Level Design: Unity Basics in Under 2 Hours: Collected 16 video ids (downloading 16 of them)
[download] Downloading video 1 of 16
[udemy] 6568718: Downloading webpage
[udemy] 6568718: Downloading lecture JSON
[download] Resuming download at byte 523264
[download] Destination: Welcome to the course!-7826436.mp4
[download] 26.1% of 3.82MiB at 1.31MiB/s ETA 00:02
ERROR: Interrupted by user
Empty cookie:
> py -2.7 .\youtube_dl\__main__.py --cookies 'C:/Users/dst/Downloads/cookies-empty.txt' https://www.udemy.com/learn-level-design-unity-basics-in-under-2-hours/
[udemy:course] learn-level-design-unity-basics-in-under-2-hours: Downloading webpage
[udemy:course] 269: Enrolling in the course
[udemy:course] 269: 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; 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.
can I ask what you used to export cookies?
I was using the same exact addon, but I also had a second cookie exporting addon, I had firefox setup using a custom privacy setting (even though the cookies were present at the time of export and were actually exported)
I removed both cookie exporters, reset firefox privacy settings, then installed the cookie exporter again, and now youtube-dl works. This is a weird thing but I guess it's not related to youtube-dl, though it would be great if it wasn't so picky with its specific taste in cookie format.
It has nothing to do with cookie file format (the error is different in this case) but cookie file contents namely missing or expired cookies or so.
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --version
and ensure your version is 2017.05.09. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add
-v
flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
Trying to download from Udemy, creditentials in cookies.