Closed vmaks closed 8 years ago
I absolutely like it! Please make a pull request, whole idea looks great.
I barely looked into code, I think it's better to use argpase module to parse args, it also can handle --help
options and other neat stuff, edx using it https://github.com/coursera-dl/edx-dl/blob/master/edx_dl/edx_dl.py#L228, and it's available for python>=3.2 and python>=2.7.
Another good option for handling command line options is Click library
It's fine to use external libraries, we already have requests
, so it's up to you to choose :)
Thank you for review! I have made a pull request. I will look at argpase module to parse args.
I have changed getopt to argpase module to parse args.
Looks good to me, but I didn't had a chance to test it yet. Anyway it's much readable right now with argparse and comments. I like it!
Will merge after testing. 👍
I am glad you like it!
I think we could close the issue.
I also thought about "don't download a video if it exists", but I don't know how to check if the video is corrupted, for example, if it contains only half of the original size, so we need to redownload it anyway.
I don't think it's critical feature, but it's simple my thoughts.
Hi!
I want to discuss the command line interface before implementing anything in the code.
I have used coursera-dl, edx-dl, youtube-dl apps recently.
I think we could simplify the interface for an ordinary user.
A user won't need edit any files after that. You also could put it in the pip after that.
We could delete "settings.py", "multipleDownloader.py" and rename "weekDownloader.py" to simply "downloader.py".
After that you won't be able to download multiple courses at once without external script, but ordinary user won't do it anyway, right?
By default the script will download the whole course, but you will be able to specify the week number.
I could parse input arguments with help of getopt.
An examples of usage and arguments are described below.
What do you think about that?
Example of usage
All arguments
Mandatory parameters
Optional parameters (default value in the brackets)