diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lib/login.js | 12 | ||||
-rw-r--r-- | package.json | 4 |
3 files changed, 10 insertions, 8 deletions
@@ -60,7 +60,7 @@ Presets: ### Videos and closed captions -Download all available videos from lists present in the `wiki` pages for any given week. If no lists are present in `wiki` add `--cw` to search through the main courseware pages; make sure your [user profile](https://university.mongodb.com/edit_profile) video preferences are set to youtube. +Download all available videos from lists present in the `wiki` pages for any given week. If no lists are present in `wiki` add `--cw` to search through the main courseware pages. Add `--cc` to download closed captions with the videos and `--hq` to get high quality videos. Use with `--co` to sequence the video files in order of the wiki ( based on the order of the files present in the wiki lists ) or courseware ( when used with `--cw` preserves the courseware order ). diff --git a/lib/login.js b/lib/login.js index fb0e81b..d99f7ea 100644 --- a/lib/login.js +++ b/lib/login.js @@ -106,10 +106,10 @@ module.exports = { if (res.statusCode === 200) { var list = [], $ = cheerio.load(body), - current = $('section.my-courses-courses').children(), - link = $(current).filter('.media').children().find('h3').children(), - noCourses = $('section[class="empty-dashboard-message"]').text(), - findNewCourses = $('section[class="empty-dashboard-message"] a').attr('href'); + current = $('#tab-current'), + link = current.find('div.section-course').children().find('h4').children(), + noCourses = current.find('section.section-courses-empty').text(), + findNewCourses = current.find('div.section-courses-empty-buttons a').attr('href'); bar.tick(); @@ -119,7 +119,9 @@ module.exports = { bar.tick(); - if (noCourses) { currentProfile.noCourses = noCourses.trim().split('\n').map(function items(item) { return item.replace(/ +/g, ' '); }).join('') + ' at ' + url + findNewCourses + '.\n'; } + if (noCourses) { currentProfile.noCourses = noCourses.trim().split('\n').map(function items(item) { + return item.replace(/ +/g, ' '); + }).join('').replace(/ +/g, ' ') + ' at ' + url + findNewCourses + '.\n'; } return callback(null, list, currentProfile); } diff --git a/package.json b/package.json index 307e6af..b1f62bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mongo-edu", "preferGlobal": true, - "version": "0.2.25", + "version": "0.2.3", "author": "Przemyslaw Pluta <przemyslawplutadev@gmail.com> (http://przemyslawpluta.com)", "description": "Select and download videos and handouts from university.mongodb.com courses", "main": "./mongo-edu", @@ -44,7 +44,7 @@ "pretty-error": "~1.2.0", "progress": "~1.1.8", "request": "~2.67.0", - "request-progress": "~0.3.1", + "request-progress": "~0.4.0", "rimraf": "~2.4.4", "which": "~1.2.0", "yargs": "~3.30.0", |