-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Cannot download video from udemy #1164
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Account shared. |
This comment was marked as resolved.
This comment was marked as resolved.
No, nobody has a solution yet. If/when there is any update, you'll see a commit/PR |
Wouldn't it be possible to forward the captcha to a browser, like jDownloader does it? |
same issue using version
|
I want to watch Udemy video on mpv for studying and note-taking.
def is_logged(webpage):
return any(re.search(p, webpage) for p in (
r'href=["\'](?:https://www\.udemy\.com)?/user/logout/',
r'>Logout<',
r'"is_authenticated":true', # added
fr'"email":"{username}"')) # added Udemy login popup is updated. So it needs to be updated.
if any(p in webpage for p in (
'>Please verify you are a human',
'Access to this page has been denied because we believe you are using automation tools to browse the website',
'"_pxCaptcha"',
'cf-captcha-container')): # added
raise ExtractorError(
'Udemy asks you to solve a CAPTCHA. Login with browser, '
'solve CAPTCHA, then export cookies and pass cookie file to '
'yt-dlp with --cookies.', expected=True)
def _real_extract(self, url):
lecture_id = self._match_id(url)
webpage = self._download_webpage(url, lecture_id)
course_id, _ = self._extract_course_info(webpage, lecture_id)
#course_id = "3833504" # If I pass correct course id, it would get correct lecture info.
try:
lecture = self._download_lecture(course_id, lecture_id)
|
@hwiorn , I've add the above changes with the specific course id but still its not working. Here is the error which I'm getting - sm@Sndps-MacBook-Pro yt-dlp-master % yt-dlp -u xxxx -p xxxx -P '/Downloads' -o '%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/ --verbose [debug] Command-line config: ['-u', 'PRIVATE', '-p', 'PRIVATE', '-P', '/Downloads', '-o', '%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s', 'https://www.udemy.com/course/learn-flutter-dart-to-build-ios-android-apps/', '--verbose'] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 File "/usr/local/Cellar/yt-dlp/2022.7.18/libexec/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 777, in _request_webpage |
Account shared. |
BTW: why should cloudflare ask for a captcha to be solved using yt-dlp from the same machine, same originating IP compared with a webbrowser on the same machine. |
@hwiorn I tried your method, but it doesn't seem to work. I'm not that into Python, tried to add |
This comment was marked as spam.
This comment was marked as spam.
I was just playing around with this and found a simple work-around, namely I don't know that firefox is a necessary argument, but I think the cloudflare issue must be getting proc'd by some difference in
yt-dlp --user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0' --cookies-from-browser firefox -P . -o "%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s" "https://www.udemy.com/course/docker-mastery" [Cookies] Extracting cookies from firefox
[Cookies] Extracted 1909 cookies from firefox
[udemy:course] Extracting URL: https://www.udemy.com/course/docker-mastery
[udemy:course] course: Downloading webpage
[udemy:course] 1035000: Downloading course curriculum
[download] Downloading playlist: 1035000
[udemy:course] Playlist 1035000: Downloading 170 items of 170
[download] Downloading item 1 of 170
[udemy] Extracting URL: https://www.udemy.com/course/learn/v4/t/lecture/32367182#__youtubedl_smuggle=%7B%22course_id%22%3A+%221035000%22%7D
[udemy] 32367182: Downloading lecture JSON
[udemy] 41522200: Downloading m3u8 information
[info] 41522200: Downloading 1 format(s): hls-3215
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 99
[download] Destination: 1035000\1 - Quick Start!\What is Docker in 2022? The Three Innovations.mp4
[download] 100% of 227.58MiB in 00:01:07 at 3.35MiB/s
[FixupM3u8] Fixing MPEG-TS in MP4 container of "1035000\1 - Quick Start!\What is Docker in 2022? The Three Innovations.mp4"
[download] Downloading item 2 of 170
[udemy] Extracting URL: https://www.udemy.com/course/learn/v4/t/lecture/32367184#__youtubedl_smuggle=%7B%22course_id%22%3A+%221035000%22%7D
[udemy] 32367184: Downloading lecture JSON
[udemy] 41522954: Downloading m3u8 information
[info] 41522954: Downloading 1 format(s): hls-2580
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 109
[...] I have not tried to modify the netscape-formatted cookies file to see if it changes behavior, just a shot in the dark. |
The workaround from @gamedazed provided few days ago does not work for me. Also it seems that Udemy Business is using AWS CloudFront now. It stopped working all of a sudden around May 14th / May 15th (relative to sun). |
This comment was marked as spam.
This comment was marked as spam.
Has anyone found a solution? |
Possible workaround is to use |
not work |
Has anyone found a solution or working workaround? |
I was hopping any one got solution for this. :) |
Hi 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:
The text was updated successfully, but these errors were encountered: