Cannot download video from udemy
See original GitHub issueHi there,
I got 403 error when downloading course from udemy business. I used command:
yt-dlp -u udemy@abc.com -p password -P '~/Downloads' -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://abc.udemy.com/course/ielts-vocab-builder-002/
I’m sure that the username/password in command is correct. Please see the log:
[debug] Command-line config: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-P', "'~/Downloads'", '-o', "'%(playlist)s/%(chapter_number)s", '-', "%(chapter)s/%(title)s.%(ext)s'", 'https://abc.udemy.com/course/ielts-vocab-builder-002/', '-v']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.09.25 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.18363-SP0
[debug] exe versions: none
[debug] Optional libraries: Crypto, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [generic] Extracting URL: -
ERROR: [generic] '-' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:-" ) to search YouTube
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 585, in extract
File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: '-' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:-" ) to search YouTube
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 585, in extract
File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: '-' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:-" ) to search YouTube
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "yt_dlp\YoutubeDL.py", line 1227, in wrapper
File "yt_dlp\YoutubeDL.py", line 1252, in __extract_info
File "yt_dlp\extractor\common.py", line 601, in extract
yt_dlp.utils.ExtractorError: [generic] '-' is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:-" ) to search YouTube
[debug] [generic] Extracting URL: %(chapter)s/%(title)s.%(ext)s'
ERROR: [generic] "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 585, in extract
File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 585, in extract
File "yt_dlp\extractor\generic.py", line 2490, in _real_extract
yt_dlp.utils.ExtractorError: "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "yt_dlp\YoutubeDL.py", line 1227, in wrapper
File "yt_dlp\YoutubeDL.py", line 1252, in __extract_info
File "yt_dlp\extractor\common.py", line 601, in extract
yt_dlp.utils.ExtractorError: [generic] "%(chapter)s/%(title)s.%(ext)s'" is not a valid URL. Set --default-search "ytsearch" (or run yt-dlp "ytsearch:%(chapter)s/%(title)s.%(ext)s'" ) to search YouTube
[udemy:course] Downloading login popup
ERROR: [udemy:course] course: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see https://github.com/yt-dlp/yt-dlp on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
File "yt_dlp\extractor\common.py", line 694, in _request_webpage
File "yt_dlp\YoutubeDL.py", line 3256, in urlopen
File "urllib\request.py", line 531, in open
File "urllib\request.py", line 640, in http_response
File "urllib\request.py", line 569, in error
File "urllib\request.py", line 502, in _call_chain
File "urllib\request.py", line 649, in http_error_default
Issue Analytics
- State:
- Created 2 years ago
- Reactions:14
- Comments:20 (2 by maintainers)
Top Results From Across the Web
How to Download Lectures to a Computer (if Enabled)
The video is taking too long to download · of the lecture so the file size for the download is smaller (see the...
Read more >4 Ways to Download Udemy Courses on PC [All at Once]
Method 1: Download Udemy paid courses with Allavsoft. The first tool to download videos from Udemy is Allavsoft. It has a concise interface...
Read more >Best Ways to Download Udemy Courses for Offline Viewing
If you're looking for a lightweight Udemy video downloader to download Udemy videos, you may try Video DownloadHelper. This is a popular Chrome ......
Read more >How To Download Udemy Videos/course In 8 Secure Ways ...
Allavsoft is highly recommended to download video courses from Udemy. By default, it directly downloads Udemy videos to MP4. If you prefer to...
Read more >How can I download Udemy course videos? - Quora
Unfortunately, Udemy doesn't allow you to download their videos due to copyright issues. However, if you save the lectures for your personal use,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Account shared. Answer from pukkandan: Cloudflare captcha is causing the issue. Will need to investigate further to find a solution
I want to watch Udemy video on mpv for studying and note-taking. I tested
2022.06.29and found some issues and workaround.udemy.py:L168-L171Udemy login popup is updated. So it needs to be updated. But after a few successful logins, I couldn’t log in. Udemy just returnend the login popup html. I don’t know why. Maybe Udemy restriction?
yt-dlpneeds to be updated inudemy.py:L132-L139udemy.py:L205_real_extractpasses wrongcourse_idto_download_lecture. It always gets403 Forbidden. Ifcourse_idis correct,yt-dlpwill download video properly. I wanted to make a PR but I couldn’t fix the 3 because I couldn’t pass playlist url which has realcourse_idto_real_extract.