dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.73k stars 299 forks source link

Section filter #107

Open zanderle opened 10 years ago

zanderle commented 10 years ago

105

Renamed week filter to section filter, added option to create lists with intervals (e.g. "3:6" would produce [3,4,5,6] and ":4" -> [1,2,3,4]), and added "--list" flag, which gives us a list of all downloadable sections and their associated indices, so we can figure out which sections we want to download.

xu-cheng commented 10 years ago

You may want to merge these commits into dgorissen:mechanize rather than dgorissen:master.The master branch has changed a lot with python 3 support.

Or you can update the pull request with the latest changes, and replace all your print statement with print_ function.

dgorissen commented 10 years ago

Thanks for the patch. A few comments

zanderle commented 10 years ago

Cool, thank you for a detailed and structured response! I will get to it. One comment regarding

I would aim to support something like: "1,3,4:7,9,12:" Or is that overkill, what do people think?

Personally, I think that might be an overkill at the moment. I believe stuff like automatic download of only unwatched lectures is more important. We can always get back to it, if it turns out to be an important feature. Would that be ok?

ps facepalming over the "split" comment. I don't know how I missed that :D

dgorissen commented 10 years ago

Np, sounds good. Most important thing is that the feedback to the user is clear.


Web : http://dirkgorissen.com Twitter : https://twitter.com/elazungu

On Sat, Nov 9, 2013 at 9:19 PM, Žan Anderle notifications@github.comwrote:

Cool, thank you for a detailed and structured response! I will get to it. One comment regarding

I would aim to support something like: "1,3,4:7,9,12:" Or is that overkill, what do people think?

Personally, I think that might be an overkill at the moment. I believe stuff like automatic download of only unwatched lectures is more important. We can always get back to it, if it turns out to be an important feature. Would that be ok?

ps facepalming over the "split" comment. I don't know how I missed that :D

— Reply to this email directly or view it on GitHubhttps://github.com/dgorissen/coursera-dl/pull/107#issuecomment-28137238 .

zanderle commented 10 years ago

please update so it merges cleanly with the current master. As the master branch is the one moving forward I would target that first. If there is interest we can always merge with dgorissen:mechanize as well later. ensure a proper error message is presented to the user on any problems don't call it get_sections if you dont return anything. Call it print_sections or list_sections instead. maybe provide a one line title before printing out the list. the +30 is hackish, use the real list length the supported syntax is very limited and it fails with a ValueError on input like "1,5:" minor: you dont need to use re to split a string, a string has a split method directly

This is the situation so far. I'm not sure when I'll have the time to do the rest of the points you made (namely the first one)