r0oth3x49 / udemy-dl Goto Github PK
View Code? Open in Web Editor NEWA cross-platform python based utility to download courses from udemy for personal offline use.
License: MIT License
A cross-platform python based utility to download courses from udemy for personal offline use.
License: MIT License
https://i.imgur.com/EEaLhlC.png?1
Cannot get udemy-dl to connect to website to begin downloading course. Says I need user/pass/link but all 3 are typed correct. Can anyone help me figure out what is wrong and how to fix it?
I'm getting the following error message when I try to download a course:
Traceback (most recent call last):
File "/opt/udemy-dl/udemy-dl.py", line 858, in
main()
File "/opt/udemy-dl/udemy-dl.py", line 774, in main
udemy.ExtractAndDownload(path=outto)
File "/opt/udemy-dl/udemy-dl.py", line 387, in ExtractAndDownload
out = self.Downloader(_url, lecture_name, chapter_path)
File "/opt/udemy-dl/udemy-dl.py", line 88, in Downloader
out = course_dl.download(url, title, filepath=path, quiet=True, callback=self.Download)
File "/opt/udemy-dl/udemy/_downloader.py", line 90, in download
outfh = open(temp_filepath, fmode)
FileNotFoundError: [Errno 2] No such file or directory: 'illustrator/v4/01 Getting Started.part'
I have udemy-dl installed to my /opt directory, with execute permissions. No matter if I try to run it from inside that directory in /opt or elsewhere, like my home folder, I keep getting this error.
Bro can i download all courses which i bought at once ?? need help
When i try to list infos from a specific course i get the following error
Traceback (most recent call last):
File "./udemy-dl.py", line 892, in
main()
File "./udemy-dl.py", line 657, in main
udemy.ListDown()
File "./udemy-dl.py", line 258, in ListDown
sz,in_MB = self.get_filsize(url)
File "./udemy-dl.py", line 182, in get_filsize
req = get(url, stream=True)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 494, in request
prep = self.prepare_request(req)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/sessions.py", line 437, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 305, in prepare
self.prepare_url(url, params)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 379, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'view_html': No schema supplied. Perhaps you meant http://view_html?
i have this configuration file:
{
"username" : "[my account]",
"password" : "[my password]",
"resolution" : "1080",
"output" : ""
}
script execution:
python3 ./udemy-dl.py -l https://www.udemy.com/mastering-ansible/learn/v4/
when I type:
pip install -r requirements.txt
I got this message:
Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
and I have already install all the requirements.
What's wrong with that?
Any plans to include support for Udemy for Business accounts? Each business has it's own unique URL i.e. https://mybusiness.udemy.com and the login page URLs are slightly different. I'm not a developer but I've tried to modify the code myself with a find & replace but obviously there's more to it than that. I've included the error I got when trying below with the latest version of code (username and password are in the configuration file not in the command):
host2:~/udemy-dl# python udemy-dl.py https://mybusiness.udemy.com/learn-how-to-code/
__ ____
__ ______/ /__ ____ ___ __ __ ____/ / /
/ / / / __ / _ \/ __ `__ \/ / / /_____/ __ / /
/ /_/ / /_/ / __/ / / / / / /_/ /_____/ /_/ / /
\__,_/\__,_/\___/_/ /_/ /_/\__, / \__,_/_/
/____/
Version : 0.3
Author : Nasir khan(r0ot h3x49)
Visit : https://github.com/r0oth3x49
[*] : Using cached configurations..
[*] : Downloading webpage..
[*] : Extracting course information..
[*] : Downloading 'learn how to code'.
Traceback (most recent call last):
File "/root/udemy-dl/udemy/_extractor.py", line 69, in _get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "udemy-dl.py", line 893, in <module>
main()
File "udemy-dl.py", line 566, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 280, in ExtractAndDownload
self.login()
File "udemy-dl.py", line 39, in login
extract_info.login(self.username, self.password)
File "/root/udemy-dl/udemy/_extractor.py", line 101, in login
csrf_token = self._get_csrf_token()
File "/root/udemy-dl/udemy/_extractor.py", line 72, in _get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
After trying to download a course I been getting the following:
[] : Downloading webpage..
[] : Extracting course information..
[*] : Downloading 'learn'.
Traceback (most recent call last):
File "C:\U2\udemy-dl.py", line 894, in
main()
File "C:\U2\udemy-dl.py", line 799, in main
udemy.ExtractAndDownload()
File "C:\U2\udemy-dl.py", line 281, in ExtractAndDownload
self.login()
File "C:\U2\udemy-dl.py", line 40, in login
extract_info.login(self.username, self.password)
File "C:\U2\udemy_extractor.py", line 101, in login
csrf_token = self._get_csrf_token()
File "C:\U2\udemy_extractor.py", line 72, in _get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
Thanks!
i don't know what's wrong i do i installed python and it's work fine and pip work fine just tested with pip install youtube-dl
is there a doc or video thanks
Hi there,
It seems that in MacOSX (Sierra), if I specify the output location (using -o option). When I use tilde to indicate my home directory (for example instead of /Users/me/download
, I just specify as ~/download
), it will just create that as a directory as tilde (~).
Regards,
Zul
Hello, Im having this problem, I am having error like this can you help me?
Traceback (most recent call last):
File "udemy-dl.py", line 896, in <module>
main()
File "udemy-dl.py", line 529, in main
config = use_cached_creds()
File "C:\Users\cooz\Desktop\udemy-dl\udemy\_utils.py", line 40, in use_cached_credentials
creds = json.load(fout)
File "C:\Users\cooz\AppData\Local\Programs\Python\Python36-32\lib\json\__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\Users\cooz\AppData\Local\Programs\Python\Python36-32\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\cooz\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\cooz\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 5 column 18 (char 117)
Hello, Im having this problem can you help me?
Traceback (most recent call last):
File "udemy-dl.py", line 898, in <module>
main()
File "udemy-dl.py", line 688, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 396, in ExtractAndDownload
out = self.Downloader(_url, lecture_name, chapter_path)
File "udemy-dl.py", line 88, in Downloader
out = course_dl.download(url, title, filepath=path, quiet=True, callback=self.Download)
File "/$USER/udemy-dl/udemy/_downloader.py", line 90, in download
outfh = open(temp_filepath, fmode)
IOError: [Errno 71] Protocol error: '/$USER/udemy-dl/vuejs-from-beginner-to-professional/02 Fundamentals of Vue.js/010 Exercises: String interpolation, methods and directives.mp4.part'
I'm using this:
python udemy-dl.py https://www.udemy.com/vuejs-from-beginner-to-professional/
Course: https://www.udemy.com/complete-android-developer-course/
Operating System: Windows 7
Ran the .bat as administrator
After fetching the newest tarball i run into this error on MacOS with Homebrew. Version before was good, but got in Courses with empty material files (e.g. Empty PowerPoint files) always:
Traceback (most recent call last):
File "udemy-dl.py", line 858, in
main()
File "udemy-dl.py", line 774, in main
udemy.ExtractAndDownload(path=outto)
File "udemy-dl.py", line 387, in ExtractAndDownload
out = self.Downloader(_url, lecture_name, chapter_path)
File "udemy-dl.py", line 88, in Downloader
out = course_dl.download(url, title, filepath=path, quiet=True, callback=self.Download)
File "/Users/shade/Downloads/udemy-dl-master/udemy/_downloader.py", line 120, in download
progress_stats = (bytesdone, bytesdone * 1.0 / total, rate, eta)
ZeroDivisionError: float division by zero
Now, with the newest revision i get:
[] : Downloading webpage..
[] : Extracting course information..
[*] : Downloading '....'.
Traceback (most recent call last):
File "udemy-dl.py", line 858, in
main()
File "udemy-dl.py", line 774, in main
udemy.ExtractAndDownload(path=outto)
File "udemy-dl.py", line 280, in ExtractAndDownload
self.login()
File "udemy-dl.py", line 39, in login
extract_info.login(self.username, self.password)
File "/Users/shade/.Trash/udemy-dl-master/udemy/_extractor.py", line 99, in login
csrf_token = self._get_csrf_token()
File "/Users/shade/.Trash/udemy-dl-master/udemy/_extractor.py", line 70, in _get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
Getting Below error
Traceback (most recent call last):
File "udemy-dl.py", line 915, in
main()
File "udemy-dl.py", line 705, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 411, in ExtractAndDownload
_is_converted = vtt2srt.convert(lecture_name)
File "D:\Python\Software\udemy-dl-master\udemy-dl-master\udemy_utils.py", line 227, in convert
content = [line for line in (l.strip() for l in f_in) if line]
File "D:\Python\Software\udemy-dl-master\udemy-dl-master\udemy_utils.py", line 227, in
content = [line for line in (l.strip() for l in f_in) if line]
File "D:\Python\Software\udemy-dl-master\udemy-dl-master\udemy_utils.py", line 227, in
content = [line for line in (l.strip() for l in f_in) if line]
File "D:\Users\vikas_sing\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 40: character maps to
1 Could it just add the download subtitle(don't download video) ? Ex : udemy-dl -subonly
2 Could it change the subtitle format (ex: vtt to srt) ? Ex:udemy-dl -subformat vtt2srt
Tks for your help. This is great.
No Issues, just yours is the first fork I have found that just works (since the requested quality not found issue).
I don't use this to pirate but just to watch my purchased videos at work behind a corporate firewall so this works well for me.
udemy-dl can't save or load files with "?" or special characters in their video names
Can you take a look into this pls ?
Hi there! I'm getting an error:
[CRITICAL-238] Skipped. Expected quality not found!
On different courses. I've tried to add the -q
flag, but the same error.
Can you help me out?
Hi! How's going? hope ok...
I was trying to download a course with an outdated udemy-dl version, but every time the program falls in this error
Traceback (most recent call last):
File "udemy-dl.py", line 475, in
main()
File "udemy-dl.py", line 406, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 295, in ExtractAndDownload
_url = max(urls, key=urls.get)
ValueError: max() arg is an empty sequence
and stop... So, I updated the udemy-dl to the latest version, and tried to download the same course again, and got this error now
Traceback (most recent call last):
File "udemy-dl.py", line 646, in
main()
File "udemy-dl.py", line 604, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 362, in ExtractAndDownload
out = self.Downloader(_url, lecture_name, chapter_path)
File "udemy-dl.py", line 88, in Downloader
out = course_dl.download(url, title, filepath=path, quiet=True, callback=sel
f.Download)
File "D:\udemy\udemy_downloader.py", line 72, in download
response = compat_urlopen(req)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 526, in open
response = self._open(req, data)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 544, in _open
'_open', req)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 504, in _call_chain
result = func(*args)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 1361, in https_open
context=self._context, check_hostname=self._check_hostname)
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\urllib\requ
est.py", line 1321, in do_open
r = h.getresponse()
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client
.py", line 1331, in getresponse
response.begin()
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client
.py", line 297, in begin
version, status, reason = self._read_status()
File "C:\Users\Homer\AppData\Local\Programs\Python\Python36-32\lib\http\client
.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
any thoughts? =)
Cheers =)
Hello,
I have an issue with this command :
python udemy-dl.py -u [email protected] -p myPa$$w0rdisKewl https://www.udemy.com/learn-microsoft-excel-formulas-and-functions-with-examples/
(coupon code = BLOG_FREE)
The script downloads the first 2 videos then crash with the following output :
[*] : Lecture : '002 Course-Resources-Formulas.zip' (already downloaded). Traceback (most recent call last): File "udemy-dl.py", line 475, in <module> main() File "udemy-dl.py", line 406, in main udemy.ExtractAndDownload() File "udemy-dl.py", line 295, in ExtractAndDownload _url = max(urls, key=urls.get) ValueError: max() arg is an empty sequence
Any idea ?
Thanks in advance
It seems like it's because chapter 3 is empty (no video and no file), then videos_dict[chap].items() contains this :
`
[
('001 0101 Welcome to the course!', {'https://udemy-assets-on-demand2.udemy.com/2015-12-10_11-36-03-d9cad445afd01bd3ed6237b0b39d8f12/WebHD_720p.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '720', 'https://udemy-assets-on-demand.udemy.com/2015-12-10_11-36-03-d9cad445afd01bd3ed6237b0b39d8f12/WebHD_480.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '480', 'https://udemy-assets-on-demand2.udemy.com/2015-12-10_11-36-03-d9cad445afd01bd3ed6237b0b39d8f12/WebHD.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '360'}),
('002 Course-Resources-Formulas.zip', {'label': 'download', 'file': 'https://udemy-assets-on-demand.udemy.com/2015-12-12_15-08-15-30bcf7d2876a1ce6ccafeebb5479d8d7/2ea281a9-32a9-4957-b11e-530de969fed0.zip?nva=20170706163040&download=True&filename=Course-Resources-Formulas.zip&token=xxxxxxxxxxxxxxxxxxxx'}), ('002 Download Working Files, Ongoing Support & How to Instantly Contact Me', {}),
('004 0102 How to Best View This Course', {'https://udemy-assets-on-demand2.udemy.com/2015-12-10_12-58-55-e2549cd030adb9ee755f3670fa46a39a/WebHD_720p.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '720', 'https://udemy-assets-on-demand2.udemy.com/2015-12-10_12-58-55-e2549cd030adb9ee755f3670fa46a39a/WebHD_480.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '480', 'https://udemy-assets-on-demand2.udemy.com/2015-12-10_12-58-55-e2549cd030adb9ee755f3670fa46a39a/WebHD.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '360'}),
('005 0103 How to Review this Course and Obtain Your Certificate of Completion', {'https://udemy-assets-on-demand2.udemy.com/2015-12-10_13-00-31-daad5e22acbe759fdf88b123d5b2bd55/WebHD_720p.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '720', 'https://udemy-assets-on-demand.udemy.com/2015-12-10_13-00-31-daad5e22acbe759fdf88b123d5b2bd55/WebHD_480.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '480', 'https://udemy-assets-on-demand2.udemy.com/2015-12-10_13-00-31-daad5e22acbe759fdf88b123d5b2bd55/WebHD.mp4?nva=20170706163040&token=xxxxxxxxxxxxxxxxxxxx': '360'})
]`
I think the code could be improved to handle that.
Hi @r0oth3x49,
I downloaded some Turkish course and I saw video numbers instead of Turkish characters on downloaded videos and texts, I putted some samples to below:
Can you support this issue?
Thanks.
I indeed have access to the internet...
sudo python udemy-dl.py -u [email protected] -p thepassword https://www.udemy.com/capital-market-immersion -l
[] : Downloading webpage..
[] : Extracting course information..
[] : Downloading 'capital market immersion'.
[] : Trying to login as ([email protected])...
[-] : Connection error : make sure your internet connection is working.
I'm having an issue while downloading the course iOS 11 & Swift 4 - The Complete iOS App Development Bootcamp. The download stopped with the following error message:
Traceback (most recent call last):
File "udemy-dl.py", line 646, in
main()
File "udemy-dl.py", line 496, in main
udemy.ExtractAndDownload(path=outto, quality=res, default=True)
File "udemy-dl.py", line 356, in ExtractAndDownload
f.write("[+] -- name {}\n[+] -- Visit {}\n".format(lecture_name, _url))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 51-52: ordinal not in range(128)
Running on python version 2.7.14 and macOS Sierra 10.12.6
Can you please look into it?
Hi, there is 2 problem about resources and links.
first is that you can download only 1x resource link links-to-visit
from every chapter. I mean if there is 5x chapter, and every chapter has 8 lecture I can see only the last lecture link. so I cant download lecture 1 - 7 links or resources. and it is possible that every lecture has more than 2-3x resource link
second problem is about Quizzes. this part is not work too
also it is good to add them in another folder. I find an working example here. both problems that I explain above are working here.
https://github.com/madmax2/udemy-dl-windows
but my knowledge is low in python. I will try to add it in future but it is hard for me :)
In downloading this course:
https://goo.gl/npcfo3
Module 01 - Getting started with docker technologies
Downloads fine.
However, when it goes to start module 02 - Working with docker images.
I get the following error:
Traceback (most recent call last):
File "udemy-dl.py", line 915, in <module>
main()
File "udemy-dl.py", line 705, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 411, in ExtractAndDownload
_is_converted = vtt2srt.convert(lecture_name)
File "/Users/mememe/UdemyDownloader/udemy-dl/udemy/_utils.py", line 227, in convert
content = [line for line in (l.strip() for l in f_in) if line]
File "/Users/mememe/UdemyDownloader/udemy-dl/udemy/_utils.py", line 227, in <listcomp>
content = [line for line in (l.strip() for l in f_in) if line]
File "/Users/mememe/UdemyDownloader/udemy-dl/udemy/_utils.py", line 227, in <genexpr>
content = [line for line in (l.strip() for l in f_in) if line]
File "/Users/mememe/anaconda/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 3574: invalid start byte
Using MacOS with Python 3.5.
Running:
pip install -r requirements.txt
Confirms that all requirements are already satisfied.
Traceback (most recent call last):
File "udemy-dl.py", line 896, in
main()
File "udemy-dl.py", line 569, in main
udemy.ExtractAndDownload()
File "udemy-dl.py", line 286, in ExtractAndDownload
videos_dict = self.clean_dict(extract_info.real_extract(self.url, course_name, course_path))
File "/home/ec2-user/udemy-dl/udemy/_extractor.py", line 221, in real_extract
course_id = self._regex_course_id(url)
File "/home/ec2-user/udemy-dl/udemy/_extractor.py", line 137, in _regex_course_id
course_id = unescapeHTML(_search_simple_regex(r'(?<="id":\s)(\d+)',webpage).group())
AttributeError: 'NoneType' object has no attribute 'group'
So the script works perfectly fine but for some later lectures it doesn't download the subtitle files. It shows an error that's like "URL ERROR: HTTP Error 403: Forbidden"
I guess it isn't your fault as it downloaded the earlier subs but do you have any idea how can I fix this problem?
Also, I noticed how the script would skip some files from the course. It downloads videos, subs, PDF, zipped & txt files perfectly fine. But it skips over some files. You can see the files it skips here - http://prntscr.com/hefx3z
If a non-default resolution is selected via -r
any course segments that do not have that quality available require a manual 'y' entry to continue the process. Propose that an additional command line flag be added to automatically download the default if requested is not available.
Hi there,
I've cloned your repo, then I did pip install -r requirements.txt
.
But, when actually calling why do I get this:
Traceback (most recent call last): File "udemy-dl.py", line 7, in <module> import udemy File "/Users/310176470/Workspace/udemy-dl/udemy/__init__.py", line 6, in <module> from ._downloader import Downloader File "/Users/310176470/Workspace/udemy-dl/udemy/_downloader.py", line 8, in <module> from .colorized import * File "/Users/310176470/Workspace/udemy-dl/udemy/colorized/__init__.py", line 1, in <module> from .Output import * File "/Users/310176470/Workspace/udemy-dl/udemy/colorized/Output.py", line 1, in <module> from colorama import init,Fore,Back,Style ImportError: No module named colorama
Thanks
Zul
App raise Error, when try to download https://www.udemy.com/become-an-android-developer-from-scratch course.
[*] : Downloading course information webpages ..
[*] : Found (121) lectures ...
[*] : Extracting (121/1) |----------------------------------------| 0.83%
[*] : Extracting (121/2) |=---------------------------------------| 1.65%
[*] : Extracting (121/3) |=---------------------------------------| 2.48%
Traceback (most recent call last):
File ".\udemy-dl.py", line 858, in <module>
main()
File ".\udemy-dl.py", line 531, in main
udemy.ExtractAndDownload()
File ".\udemy-dl.py", line 282, in ExtractAndDownload
videos_dict = self.clean_dict(extract_info.real_extract(self.url, course_name, course_path))
File "C:\Users\kowalsky\Downloads\udemy-dl\udemy\_extractor.py", line 298, in real_extract
if lecture_id not in udemy_dict[chap]:
KeyError: None
versions:
PS C:\Users\kowalsky\Downloads\udemy-dl> python --version
Python 3.6.2
PS C:\Users\kowalsky\Downloads\udemy-dl> pip --version
pip 9.0.1 from c:\users\kowalsky\appdata\local\programs\python\python36\lib\site-packages (python 3.6)
PS C:\Users\kowalsky\Downloads\udemy-dl> python.exe .\udemy-dl.py --version
__ ____
__ ______/ /__ ____ ___ __ __ ____/ / /
/ / / / __ / _ \/ __ `__ \/ / / /_____/ __ / /
/ /_/ / /_/ / __/ / / / / / /_/ /_____/ /_/ / /
\__,_/\__,_/\___/_/ /_/ /_/\__, / \__,_/_/
/____/
Version : 0.3
Author : Nasir khan(r0ot h3x49)
Visit : https://github.com/r0oth3x49
udemy-dl.py version 0.3
using Windows 10.
This would be great if it could download captions as well.
hello, after cloning this repo, installing the requirements and so, i get this:
Radus-MBP-2016:Downloads radu$ python udemy-dl.py -u [email protected] -p p4ssw0rd https://www.udemy.com/COURSE_NAME
Traceback (most recent call last):
File "udemy-dl.py", line 7, in <module>
import udemy
ImportError: No module named udemy
any help?
I have the following error:
[*] : Downloading lecture : (2 of 16)
[*] : Downloading (048 Dexterity Exercise 2 - Ninja Fretting Hand Skills-subtitle-en.vtt)
Traceback (most recent call last):
File "udemy-dl.py", line 898, in <module>
main()
File "udemy-dl.py", line 828, in main
udemy.ExtractAndDownload(path=outto, quality=res, default=True)
File "udemy-dl.py", line 396, in ExtractAndDownload
out = self.Downloader(_url, lecture_name, chapter_path)
File "udemy-dl.py", line 88, in Downloader
out = course_dl.download(url, title, filepath=path, quiet=True, callback=self.Download)
File "/home/anon/Apps/udemy-dl/udemy/_downloader.py", line 115, in download
eta = (total - bytesdone) / (rate * 1024.0)
ZeroDivisionError: float division by zero
While downloading this course.
Would be nice to be able to place the user and pass in a formatted (JSON|YAML|Plain Text) file that would be pulled in on script run, instead of having to enter them as command line arguments.
hi r0oth3x49,
It's a great job, but i have a problem (in Arabic Language )in course name and chapter name it's numbers.
https://www.udemy.com/linuxubuntu/learn/v4/content
[*] : Downloading chapter : (1 of 4)
[+] : Chapter (01 16051602158316051577)
[+] : Found ('3') lecture(s).
[] : Downloading lecture : (1 of 3)
[] : Downloading (001 1606159215851577 1593157516051577 159316041609 1606159215751605 1575160416041610160616031587 1576158816031604 159315751605)
[*] : 55.90MB/4.11MB 7.35% |###-------------------------------------| 131.56kB/s 06:43s ETA
I hope to fix this error quickly.
a small idea, it will be good to add an option for download things. a Boolean option like bellow
{
"username" : "",
"password" : "",
"resolution" : "",
"output" : "",
"download videos" : "true", // default true . means download videos
"download caption" : "true", // default true . means download captions
"download quizzes" : "true", // default true . means download quizzes
"download resources" : "true" // default true . means download resources like links
}
in this case we can save a lot of time and space, and download the parts that is necessary for us
Hi first thanks for this magnificent script it would be nice to add support for Spanish characters like "á, é, í, ó, ú, ñ".
A good example is "https://www.udemy.com/universidad-java-especialista-en-java-desde-cero-a-master/" the files are coming for example"019 Lecci n_ Variables en Java" instead of "Lección Variables en Java", same problem with the folder structure, comes "03 Fundamentos Java_ Instalaci n de JDK de Java y Herramientas" instead of "Fundamentos Java Instalación de JDK de Java y Herramientas".
Another change that would be great is replacing the character:"_" for "-" (with an space for example "03 Fundamentos Java_ Instalaci n de JDK de Java y Herramientas" to "Fundamentos Java - Instalación de JDK de Java y Herramientas") when ":" is present in titles and video/attachments descriptions.
Thanks in advance, regards!
Hi @r0oth3x49,
First thanks for the 'udemy-dl' app. I have a wonder, if we don't pass the "-r" arg as "720", what is your app default behaviour? Will the app list the exist resolution and select max or select first? I wonder it because I ran with "-l" videos don't order by resolution.
Thanks.
Hi r0oth3x49, congratulations for this work and thank you from Spain.
I have some downloading problem with a particular Udemy course. In this course there is a chapter named: "¿Puedo ponerme en contacto con los profesores?"
The error is the following:
[*] : Lecture : (006 Puedo ponerme en contacto con los profesores?)
Traceback (most recent call last):
File "udemy-dl.py", line 893, in <module>
main()
File "udemy-dl.py", line 823, in main
udemy.ExtractAndDownload(path=outto, quality=res, default=True)
File "udemy-dl.py", line 423, in ExtractAndDownload
with open(filename, 'wb') as f:
OSError: [Errno 22] Invalid argument: '006 Puedo ponerme en contacto con los profesores?.html'
I think the problem is with the '?' at the end. Because windows don't support this character for a file.
as the topic pdf / quizzes are not detected with this program, so we can download non of these files
Created a virtualenvironment with Python 2.7 as the interpreter. Added required via pip install -r requirements.txt
. Invoked script and received the following error: (Redacted private infromation)
python udemy-dl.py -u udemy@<email> -p <password> https://www.udemy.com/<coursename> -l
__ ____
__ ______/ /__ ____ ___ __ __ ____/ / /
/ / / / __ / _ \/ __ `__ \/ / / /_____/ __ / /
/ /_/ / /_/ / __/ / / / / / /_/ /_____/ /_/ / /
\__,_/\__,_/\___/_/ /_/ /_/\__, / \__,_/_/
/____/
Version : 0.1
Author : Nasir khan(r0ot h3x49)
Visit : https://github.com/r0oth3x49
[*] : Downloading webpage..
[*] : Extracting course information..
[*] : Downloading 'course'.
[*] : Trying to login as (udemy@email)...
[+] : Logged in successfully.
[*] : Downloading course information webpages ..
[*] : Found (55) lectures ...
[*] : Extracting (55/1) |=---------------------------------------| 1.82%
Traceback (most recent call last):
File "udemy-dl.py", line 481, in <module>
main()
File "udemy-dl.py", line 451, in main
udemy.ListDown()
File "udemy-dl.py", line 186, in ListDown
videos_dict = extract_info.real_extract(self.url, course_name, course_path)
File "/home/dschaper/venvs/udemy-dl/udemy/_extractor.py", line 355, in real_extract
if lecture_id not in udemy_dict[chap]:
UnboundLocalError: local variable 'chap' referenced before assignment
I've tried to use your tool with udemy for business, but the download doesn't work. This is caused by the hardcoded udemy url in your source code. Also if you want to use udemy business, you've adjust the login scrf regex pattern.
Overall the changes to get your tool working with udemy business is pretty simple.
I would offer myself to develop this feature. Are you interested in this?
Hi,
When I download video 043 App - Is It Prime?
in Swift 4 Deep Dive
from the course Complete IOS11 Development Course, the script crashed. On Window, the following characters \ / : * ? " < > |
cannot be used in filename so I guess the character ?
in the video name is the cause.
I wonder if we could parse those characters into ASCII strings (or something else) before saving to disk?
Thanks
Hi, this is an error that I get after around 15-20 min of running program
[-] : URLError : <urlopen error [Errno 11004] getaddrinfo failed>.
this is happen only after some period of time, not at start of the program
Hi, thanks for the new version it work well and caption futures too, just there is one error that I post it in another issue,
ok lets say current issue about this topic
https://github.com/r0oth3x49/udemy-dl/issues/17
about this problem, it is again same but now it is a little changed, there is no .txt file like before. but the same problem about lectures is still bug
lets say we have 3 chapter and 4lecture in chapter 1
chapter 1:
lecture a:
download file 1;
download file 2;
download file 3;
lecture b:
lecture c:
lecture d:
chapter 2:
.....................
chapter 3:
......................
with starting the program it will download only and just download file 3, and download 2 and download 1 are skipped.
Hi,
I was install all requirement on my Mac Sierra, but when i try to execute command "python udemy-dl.py -u EMAIL -p PASSWORD https://www.udemy.com/COURENAME", show this error :
Connection error : make sure your internet connection is working
What happen?
Any solution?
Thanks
Hi, I can not download the videos.
What do I do wrong?
I do not understand how the argument for video quality should be written.
I have verified that the videos are at 720.
Thank you very much.
[INFO-835] Downloading to: C:
[INFO-107] Trying to log in ...
[INFO-137] Login success.
[INFO-169] Found course id: 1145678
Getting course data: 0.87% [--------------------] [CRITICAL-238] Skipped. Expected quality not found!
Getting course data: 2.17% [--------------------] [CRITICAL-238] Skipped. Expected quality not found!
Getting course data: 3.48% [=-------------------] [CRITICAL-238] Skipped. Expected quality not found!
Getting course data: 4.35% [=-------------------] [CRITICAL-238] Skipped. Expected quality not found!
Getting course data: 4.78% [=-------------------] [CRITICAL-238] Skipped. Expected quality not found!
Getting course data: 5.22% [=-------------------] [CRITICAL-238] Skipped. Expected quality not found
Added 07/12/2017:
I'm sorry, I do not understand what happens. I downloaded the repository from this link ...
http://r0oth3x49.herokuapp.com/download-udemy-courses-using-udemy-dl/
I tried to change the source code but got an error 👎
[INFO-107] Trying to log in ...
Traceback (most recent call last):
File "C:\python\lib\site-packages\udemy_dl\udemy_dl.py", line 97, in get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "udemy-dl", line 7, in
main()
File "C:\python\lib\site-packages\udemy_dl\udemy_dl.py", line 837, in main
udemy_dl(username, password, link, lecture_start, lecture_end, save_links, safe_file_names, just_list, output_dest)
File "C:\python\lib\site-packages\udemy_dl\udemy_dl.py", line 658, in udemy_dl
login(username, password)
File "C:\python\lib\site-packages\udemy_dl\udemy_dl.py", line 109, in login
csrf_token = get_csrf_token()
File "C:\python\lib\site-packages\udemy_dl\udemy_dl.py", line 102, in get_csrf_token
return match.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.