Commit graph

1038 commits

Author SHA1 Message Date
Rogério Brito
58e2ba54a2 coursera-dl: Use a Python 3 shebang.
This makes it more convenient for when you have your modules installed from
your Linux distribution or so.

As it only affects those that are working with a cloned git tree, it is
supposed to be the case the they know what they are doing and shouldn't
affect the vast majority of the users (the wrapper created by setup.py is a
completely different one, when users install via pip etc.).

Signed-off-by: Rogério Brito <rbrito@ime.usp.br>
2017-11-06 18:29:09 -02:00
Yuri Bochkarev
0ec980514d Add China issues section in Troubleshooting 2017-08-26 21:54:45 +03:00
Yuri Bochkarev
154ef8dfef Bump version (0.8.0 -> 0.9.0)
Features:
  - Default arguments are loaded from `coursera-dl.conf` file
  - Added option `--mathjax-cdn <MATHJAX_CDN>` to specify alternative MathJax CDN
  - Added support for Resources section
2017-05-29 19:50:34 +03:00
Yuri Bochkarev
7b3e576de9 Update CHANGELOG.md 2017-05-29 19:49:38 +03:00
Yuri Bochkarev
e02fc5177a Merge pull request #607 from dzhuang/new_dl_features
New downloading features along with adaptations to the new APIs

- Enable multiple subtitles and transcripts with alternatives.
Sometimes we need to download subititles in different languages, for example, 'en' and 'zh-CN', which is not supported currently. The PR enabled downloading multiple subtitles & transcripts, along with fallback for each language, by using the following format:
```
--subtitle-language <lang1,lang2|fallback1_for_lang2|fallback2_for_lang2>
```
This can will also be an alternative fix for #596 .
- Enable downloading resources blocks.
Some materials are now in a new blocks named ``Resources``, which corresponed to the new API ``onDemandReferences.v1``. Fixing #597 

- Enable file to store parameters.  
There are cases where there are too many parameters (besides username and password) to be set each time we download a course. I use ``configargparse`` to read configurations stored in a local file named ``coursera-dl.conf``. Fixing #97 

- Enable downloading new typename ``programming``
That is different from original ``gradedProgramming`` and ``ungradedProgramming`` so it is not recognized by coursera-dl currently. An example can be find at the end of [this page].
The new API is ``onDemandProgrammingImmediateInstructions.v1``.

- Allow alternative ``MathJax.js`` cdn url when downloading webpages, as the default [``MathJax.js`` url](https://cdn.mathjax.org/mathjax/latest/MathJax.js) is not accessible in some countries (this is the case at least for me).
2017-05-23 11:25:39 +03:00
ifaint
08b8ad44c2 1. enable multiple subtitles and transcripts with alternatives.
1. enable downloading resources blocks.
1. enable file to store parameters.
1. added unit-test.
2017-05-19 01:42:48 +08:00
Rogério Brito
d1bbb58402 Merge pull request #605 from gautamkrishnar/patch-1
Fix repository language being misclassified on github.

Thanks to @gautamkrishnar for noticing the issue.
2017-05-05 21:54:45 -03:00
Gautam krishna.R
19103f2718 Update .gitattributes 2017-05-01 15:10:04 +05:30
Gautam krishna.R
f37bc44f51 fixes repository misclassifying 2017-05-01 15:02:42 +05:30
Yuri Bochkarev
effc3255f8 Merge pull request #595 from yw981/master
change course URL in README : the URL has changed.
2017-03-21 10:47:09 +03:00
Tony Yang
f66e13f668 change course URL in README 2017-03-21 14:55:11 +08:00
Yuri Bochkarev
b7f24a7724 Mention Windows proxy support in the README.md
related #205 #594
2017-03-19 15:41:43 +03:00
Yuri Bochkarev
ad18a1d3a1 Merge pull request #593 from yejunsun/master
Improve download subtitles. Add support to download exact subtitle
2017-03-14 10:06:45 +03:00
孙业军
eec99f64a4 add support to download certain subtitle 2017-03-10 14:35:53 +08:00
孙业军
2ea2e7aa62 improve download subtiles. add support to download certern language's subtile 2017-03-10 01:47:48 +08:00
Yuri Bochkarev
759fe78e62 Bump version (0.7.0 -> 0.8.0)
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
2016-10-04 00:28:21 +03:00
Yuri Bochkarev
f21fd18b4f Update CHANGELOG.md 2016-10-04 00:26:50 +03:00
Yuri Bochkarev
f7d451c581 Fix tests to make sure they use mocked session, not actual Session
related #573
2016-10-03 20:48:03 +03:00
Yuri Bochkarev
00b36f7035 Show problematic courses after having downloaded all courses
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
2016-10-03 19:51:09 +03:00
Yuri Bochkarev
69de37b82e Add support for reflect and mcqReflect question type
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
2016-10-03 19:13:44 +03:00
Yuri Bochkarev
9f333903d0 Add --only-syllabus option to download syllabus only and skip course contents
Useful for developers.

related #573
2016-10-03 18:21:18 +03:00
Yuri Bochkarev
7579dc9771 Introduce --download-delay option
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
2016-10-03 17:53:38 +03:00
Yuri Bochkarev
e430da1304 Be more verbose when printing login failure message
related #573
2016-10-03 17:37:39 +03:00
Yuri Bochkarev
7f773530fc Add missing import to playlist.py
related #573
2016-10-03 17:36:52 +03:00
Yuri Bochkarev
a1c1d624b4 Be more robust when extracting quiz/exam/programmingAssignment
This a revised version of #575 pull request by @partobs-mdp

fix #568
related #573
2016-10-03 17:36:17 +03:00
Yuri Bochkarev
4907634a9c Merge pull request #566 from CBickel87/master
Add Windows install & configuration to README.md
2016-08-17 18:00:37 +03:00
Charles Bickel
75e3726346 Update README.md 2016-08-17 09:16:07 -04:00
Charles Bickel
a8132fdb1c Update README.md 2016-08-17 09:04:56 -04:00
Charles Bickel
308fbc1857 Update README.md 2016-08-17 08:30:41 -04:00
Charles Bickel
584cbf3265 Update README.md 2016-08-17 08:26:15 -04:00
Charles Bickel
7b4c29cc2f Update README.md 2016-08-17 02:27:13 -04:00
Charles Bickel
84a8cb7b0f Update README.md 2016-08-16 16:10:13 -04:00
Yuri Bochkarev
ab9f4bfed3 Merge pull request #563 from andersonvom/master
Make class_names arg optional for certain flags
2016-08-08 14:22:20 +03:00
Yuri Bochkarev
1218a83926 Merge pull request #564 from nachikethas/docupdate
Fix command typo in alternative Unix installation
2016-08-08 14:21:33 +03:00
Anderson Mesquita
d3d1c4d0f1 Make class_names arg optional for certain flags
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
2016-08-06 10:09:38 -07:00
Nachikethas
053883eb23 Fix command typo in alternative Unix installation
By default, the git clone command clones the repository to a directory
with the repository's name.
2016-08-06 03:10:46 -07:00
Yuri Bochkarev
3cdc1f16a2 Bump version (0.6.1 -> 0.7.0)
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
2016-07-28 14:24:30 +03:00
Yuri Bochkarev
2dbe2fe0b6 Add link to coursera-dl aur package (ArchLinux) 2016-07-28 15:19:37 +04:00
Yuri Bochkarev
ad8ccf3f06 Update CHANGELOG.md 2016-07-28 14:10:35 +03:00
Yuri Bochkarev
bda29d9835 Fix error in --list-courses option 2016-07-28 12:56:44 +03:00
Yuri Bochkarev
7330014077 Merge pull request #559 from balta2ar/download-quizzes
Add support for quiz and exam download

To enable quiz/exam download, use `--download-quizzes`.

fix #490
related #546
2016-07-28 12:31:34 +03:00
Yuri Bochkarev
4f6ec33d51 Fix dict construction in python2.6 2016-07-28 11:58:19 +03:00
Yuri Bochkarev
ed8dce5472 Add fixtures for regex and mathExpression question types 2016-07-28 11:49:10 +03:00
Yuri Bochkarev
b53e176a7a Add basic support for regex and mathExpression question types
Unescape question and answer text.
2016-07-28 11:44:35 +03:00
Yuri Bochkarev
28fe48b488 Add --download-quizzes option
This option enables quiz and exam (graded and ungraded quizzes)
download.
2016-07-28 10:29:19 +03:00
Yuri Bochkarev
e19a533e9d Be more robust to errors during quiz download
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
2016-07-27 23:10:03 +03:00
Yuri Bochkarev
716acf736a Remove several excessive methods from network.py 2016-07-27 22:30:57 +03:00
Yuri Bochkarev
9c4651cba4 Update/fix tests 2016-07-27 21:22:38 +03:00
Yuri Bochkarev
ca12539595 Add support for audio files in quizzes (they are embedded into the page)
Add <meta charset> tag so that Korean Hangul is displayed properly.
2016-07-27 14:46:26 +03:00
Yuri Bochkarev
5153cfddfd Fix bug when condition for url skipping was reversed 2016-07-27 14:17:21 +03:00