Comments (51)
This looks to be caused by a cookie __cf_bm
which is a CloudFlare cookie related to anti-bot protection.
https://support.cloudflare.com/hc/en-us/articles/200170156-Understanding-the-Cloudflare-Cookies#12345681
I will try a possible to solution tomorrow.
from udemy-downloader.
f6918e4 fixes the 403 errors when fetching courses and course information. There is still a problem with yt-dlp and fetching MPD manifests causing 403 errors.
from udemy-downloader.
I've found a solution - use https://www.udemy.com/course-name/ instead of https://www.udemy.com/course/course-name/
from udemy-downloader.
True that yt-dlp cannot fetching mpd causing 403 Forbidden when I leeching encrypted files.
And yes, I did fixed utils.py, removed User-Agent header, block IPv6.
from udemy-downloader.
How do you avoid the DRM problem?
@Zeddex works but DRM fail...help me?
Just find this repo widevine-l3-guesser
from udemy-downloader.
@jbauer2016 Seems like you installed a python version which is not the normal python. Where did you installed this python from? The lib folder of the python installation should have subprocess.py library, which in your case is throwing some error. Install python from python.org, and try again.
from udemy-downloader.
Can anyone find a solution?
from udemy-downloader.
Yes, I use the latest version of yt-dlp and comment line 1680 ('User-Agent': random_user_agent(),), but error 403 occur.
I've also tried the method that @amaillo-mc mentioned building yt-dlp, but it doesn't work for me.
from udemy-downloader.
check your bearer token
from udemy-downloader.
i using bearer token but its show error
from udemy-downloader.
i using bearer token but its show error
Use US IP if you are from ME
from udemy-downloader.
Same here:
(venv) root@DESKTOP-Q0SCQBM:/mnt/d/Projects/udemy-downloader# python main.py -c https://www.udemy.com/course/XXX
Login Success
Fetching course information, this may take a minute...
Udemy Says: 403 Forbidden on https://www.udemy.com/api-2.0/users/me/subscribed-courses?fields[course]=id,url,title,published_title&page=1&page_size=500&search=XXX
I think they disable the download option for now
from udemy-downloader.
I think they disable the download option for now
If that were the case, you wouldn't be able to use the website to view courses either. I'll take a look and see if I can find what's going on
from udemy-downloader.
I just tested it and it worked fine for me, so there must be something that different with the way you are trying to download. maybe a vpn?
from udemy-downloader.
This is a real issue and I have made a fix to this for an older version of the application.
Please refer to my Discord post @ https://discord.com/channels/844358207018893323/844358207018893326/874340558796103751
from udemy-downloader.
I using vpn but its not work
from udemy-downloader.
Using or not using VPN won't change anything, unless you have a bad quality VPN (like a free VPN shared between a bunch of people or something like that). However for safety reasons I would suggest using the same IP for the downloader script as your IP was when you logged in to Udemy and ideally also changing the user-agent in the script to the exact same one as your browser.
from udemy-downloader.
how i to change user-agent in scripts?
from udemy-downloader.
https://github.com/Puyodead1/udemy-downloader/blob/master/main.py#L30 change this line after downloading the project
from udemy-downloader.
i done it but its not work again
from udemy-downloader.
Using or not using VPN won't change anything, unless you have a bad quality VPN (like a free VPN shared between a bunch of people or something like that). However for safety reasons I would suggest using the same IP for the downloader script as your IP was when you logged in to Udemy and ideally also changing the user-agent in the script to the exact same one as your browser.
forgot that was for 4xx errors, thought it was 5xx for some reason. I'll go ahead and add your fix.
from udemy-downloader.
This error raise again
from udemy-downloader.
This error raise again
Are you using the latest version of the utility?
from udemy-downloader.
This error raise again
Are you using the latest version of the utility?
Yes, I just clone this repo
from udemy-downloader.
Yeah apparently they have updated it. I've tried to login and then logout of Udemy with vpn's and without and the bearer token now remains the same.
from udemy-downloader.
I have the same error with an aditional message:
403 Forbidden, retrying (attempt 9 )...
Udemy Says: 'NoneType' object has no attribute 'json' on https://www.udemy.com/api-2.0/users/me/subscribed-courses?fields[course]=id,url,title,published_title&page=1&page_size=500&search=URL-to-the-specific-course
I appreciate so much if someone has a solution. Thanks in advanced.
from udemy-downloader.
I have the same issue. Using the same IP to login and run the script
from udemy-downloader.
Looks like something change within Udemy API
got the error
from udemy-downloader.
Just tested myself and am getting this error also, I will see if I can find out why
from udemy-downloader.
I am getting a 502 Bad gateway error as well. Is it same as above? Any possible solution for it?
from udemy-downloader.
Hello @Puyodead1, any updates on the errors?
from udemy-downloader.
I've found a solution - use https://www.udemy.com/course-name/ instead of https://www.udemy.com/course/course-name/
Seems to work as a temporary fix until someone finds a way to bypass the cf cookies. Selenium is the way @Puyodead1
from udemy-downloader.
How do you avoid the DRM problem?
Chapter(s) (16)
Lecture(s) (39)
======= Processing chapter 1 of 16 =======
Processing lecture 1 of 39
001 Introduction.mp4
> Lecture '001 Introduction' is already downloaded, skipping...
======= Processing chapter 2 of 16 =======
Processing lecture 2 of 39
001 Introuction.mp4
> Lecture '001 SAP Introuction' has DRM, attempting to download
Downloading Lecture Tracks...
Traceback (most recent call last):
File "C:\Users\usuario\Downloads\udemy-downloader-master\main.py", line 1730, in
parse_new(_udemy, quality, skip_lectures, dl_assets, dl_captions,
File "C:\Users\usuario\Downloads\udemy-downloader-master\main.py", line 1152, in parse_new
process_lecture(lecture, lecture_path, lecture_file_name,
File "C:\Users\usuario\Downloads\udemy-downloader-master\main.py", line 1040, in process_lecture
handle_segments(source.get("download_url"),
File "C:\Users\usuario\Downloads\udemy-downloader-master\main.py", line 869, in handle_segments
ret_code = subprocess.Popen([
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado
C:\Users\usuario\Downloads\udemy-downloader-master>
@Zeddex works but DRM fail...help me?
Thanks
from udemy-downloader.
@Zeddex perfect but this error ...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado
Can I be missing a new library in windows 10?
from udemy-downloader.
@Zeddex perfect but this error ...
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado
Can I be missing a new library in windows 10?
I'm going to assume you didn't read the readme and that you didn't rename the keyfile. Idk, python isnt my primary language so I'm not as familiar with it.
from udemy-downloader.
@rvipinkumar perfect
Although I have the keyid and the key, something keeps failing me, but I'll take it out
Thanks
from udemy-downloader.
Seems this issue has popped up again and the workaround mentioned above is no longer working, I looked into this and the issue is now caused by a Clouflare hCaptcha being displayed. I am not able to bypass this even when trying to use browser automation such as selenium. At this time, there is no solution to this.
from udemy-downloader.
i have this issue too,
now all users have this issue or some users?
from udemy-downloader.
Have the issue as well. Finally got around to setting this up and bam.
from udemy-downloader.
@mahdisky I think so. Udemy probably upgraded their security.
from udemy-downloader.
@Puyodead1 Did you find any solution?
from udemy-downloader.
yt-dlp is failing. check their repo as well.
from udemy-downloader.
@Puyodead1 Did you find any solution?
If I had, I would have made a comment here.
from udemy-downloader.
Same issue here
Error fetching MPD streams: 'ERROR: [generic] 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.'
Processing 5 of 118```
from udemy-downloader.
That's related to yt-dlp, the only way to fix that issue is to edit yt-dlp util.py and commenting out the user agent header. I'll most likely be making a fork of yt-dlp
from udemy-downloader.
I started to get 403 errors last few days from Udemy
I am guessing it's because the .mpds are stored on their CDN and or captcha
So I downloaded the .mpd file using Chrome's inspector >network>filter for mpd files
Then I upload the .mpd to my own web server and change "mpd_url" in the keys.json file. The keys.json file came from widevine-l3-guesser and is required for widevine-L3-WEB-DL-Script.
And it works using widevine-L3-WEB-DL-Script
from udemy-downloader.
Can anyone find a solution?
A solution has already been found and an update was already pushed
from udemy-downloader.
Closing this now, will reopen if the issue comes back
from udemy-downloader.
Can anyone find a solution?
What Puyodead1 said here: #47 (comment) woks for me.
What I've done was:
- pip uninstall yt-dlp
- git clone yt-dlp
- edit master/yt_dlp/utils.py and remove line 1680 ('User-Agent': random_user_agent(),)
- compile and install following https://github.com/yt-dlp/yt-dlp#compile
Then udemy-downloader works like a charm.
Hope this helps.
from udemy-downloader.
I try this branch 5d60bfe1ce, but still have got this error.
from udemy-downloader.
I try this branch 5d60bfe1ce, but still have got this error.
did you edit yt-dlp as instructed?
from udemy-downloader.
Related Issues (20)
- Udemy Says: 'NoneType' object has no attribute HOT 1
- [Bug]: Most of the courses can be downloaded, but some courses exist in the form of .mp4.part.frag.urls. HOT 3
- [Bug] By default, the program converts downloaded subtitles from .vtt to .srt with a high probability of failure.
- Some Videos are missing with extension name: encrypted.mp4.part.frag.urls HOT 4
- [Bug]: Access token no longer works HOT 7
- [Bug]: Getting error while playing video and on console HOT 1
- [Bug]: Exception Caught HOT 1
- [Bug]: unable to download assignment HOT 2
- [Feature Request]: Bypass udemy download detection on drm encryted course. HOT 1
- [Bug]: No such file or directory: 'quiz_template.html' HOT 1
- [Bug]: Shaka error when $ in file name HOT 1
- How to login Business udemy HOT 1
- [Bug]: Checking after downloading HOT 1
- [Bug]: Unknown command line flag 'enable_raw_key_decryption' HOT 7
- Not help because of arrogancy.
- [Bug]: Unable to extract arguments from course page! Make sure you have a cookies.txt file! HOT 3
- [Bug]: Error extracting audio kid HOT 2
- [Bug]: Video Ends Early While Audio Continues Repeating in Decrypted Files
- [Bug]: Packager is installed but script isn't running HOT 1
- [Bug]: FileNotFoundError: [Errno 2] No such file or directory: when processing asset with special character on Windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udemy-downloader.