Features:
- Add `--download-delay` option that adds a specified delay in seconds
before downloading next course. This is useful when downloading many
courses at once. Default value is 60 seconds.
- Add `--only-syllabus` option which is when activated, allows to skip
download of the course content. Only syllabus is parsed.
- Add support for `reflect` and `mcqReflect` question types in quizzes.
- Courses that encountered an error while parsing syllabus will be listed
in the end of the program execution, after all courses have been
processed (hopefully, downloaded). This helps skip vast output and easily
see which courses need user's attention, e.g. enrollment, session
switching or just patience until the course start date.
Bugfixes:
- Locked programming assignments in syllabus used to crash coursera-dl.
Now the script goes on parsing syllabus and skips locked assignments.
- Add missing import statement to playlist generation module
This change makes the script show courses where an error
during syllabus parsing occurred. Printing such courses
in the end is helpful to bring attention when downloading
multiple courses.
related #573
reflect generates the same narrow edit field as for numerical answers.
Yet it does not look as on Coursera site, I think it's enough
to indicate the intention. mcqReflect is basically the same as just mcq.
related #573
This option makes the script sleep for N seconds before
downloading next course. Default value is 60 seconds.
This option proved useful when downloading many courses at
once. Otherwise Coursera API starts to respond with errors
(cannot login).
related #573
The `class_names` argument shouldn't be required for certain flags (e.g.
`--version` or `--list-courses`). This makes it optional while also
taking these flags into account to display an appropriate error message
when they aren't being used.
Fixes#562
Features:
- Added option `--list-courses` to list currently enrolled courses (#514)
- Added option `--jobs N` to download resources in N threads simultaneously (#553)
- Added option `--download-quizzes` to download contents of graded and
ungraded quizzes (#490)
- Added option `--cache-syllabus` to avoid downloading course syllabus on
every run (this option is rather for developers)
Bugfixes:
- Locked lectures are also requested from server now, which allows to
download some programming assignments that were not downloaded before (#555)
Deletions:
- Support for old-style courses has been removed (Coursera discontinued old courses:
http://coursera.tumblr.com/post/145882467032/courseras-transition-to-a-new-technology-platform)
- `--ignore-http-errors` option has been removed and the default behavior
has been adjusted to include this option
- Removed deprecated `--on-demand` option. Now OnDemand classes are downloaded
by default
If user has already depleted his number of attempts, report that
and continue downloading other quizzes.# Please enter the commit message for your changes. Lines starting
HTTPError in debug run.
git di --
Be more verbose on cached
I nearly went gray when I attacked this feature. One day
week ago I implemented quiz download and it worked fine.
I added HTML conversion, I could see quizzes offline. Then
I had no time to work on that for a week. One week later
I ran the script and it responded with 401 Unauthorized.
God, I don't know what happened in my code, maybe I fainted
and my head dropped on the keyboard and I accidentally
removed part of the code but it stopped working. Or maybe
Coursera servers were upgraded and their response changed.
It turned out that when we download quizzes/exams, we need
to send along all those additional cookies such as a pack of
csrf* cookies, csrf_token and (I spend hours debugging it!)
CAUTH token. In fact, if I had looked at cookies.py, I would
have found out it's already implemented for login method.
Anyway, for some reasons CAUTH is not sent in POST request
even if you use requests.Session. Thus I manually add those
cookies when I request quizzes.
* Use html.parser instead of html5lib in BeautifulSoup as
the latter automatically tries to insert missing tags,
but it only makes instructions look worse offline
See http://stackoverflow.com/a/14822344/258421
* In course syllabus request from server locked items too
* Add css style for img tag to make sure that large
images are scaled down to maximal page width, but
small images remain the same
See http://stackoverflow.com/a/18113104/258421
* Print lecture typeName during the parsing stage
fix#555
related #546