summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2015-11-25 19:51:00 +0000
committerprzemyslawpluta <przemekpluta@hotmail.com>2015-11-25 19:51:00 +0000
commit102c420963b2e446eac19815e55b4987055d2ed7 (patch)
tree0e2a91a7e407b98f40af228e1f9f75ff88e3e457
parent0fedc1f10c4d5b9cb020e25c6e8440e31a7d1dd2 (diff)
downloadmongo-edu-102c420963b2e446eac19815e55b4987055d2ed7.zip
fix handouts download
version bump
-rw-r--r--lib/login.js12
-rw-r--r--package.json12
2 files changed, 14 insertions, 10 deletions
diff --git a/lib/login.js b/lib/login.js
index 29ab9a3..fb0e81b 100644
--- a/lib/login.js
+++ b/lib/login.js
@@ -181,10 +181,14 @@ module.exports = {
} else {
$('tbody tr').map(function map(i, item) {
- var current = $(item), text = current.children().first().text(), href = $(current.find('a')).attr('href');
- if (href) {
- list.push({ name: text, value: host + $(current.find('a')).attr('href') });
- }
+ var current = $(item),
+ text = current.children().first().text(),
+ href = $(current.children().last().find('a')).attr('href');
+
+ if (text) { text = text.trim(); }
+
+ if (href) { list.push({ name: text, value: host + href }); }
+
});
if (list.length) { list.unshift({name: 'All', value: 'all', checked: true}, {name: 'Cancel', value: 'cancel'}); }
diff --git a/package.json b/package.json
index 9b62631..cb90e85 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mongo-edu",
"preferGlobal": true,
- "version": "0.2.23",
+ "version": "0.2.24",
"author": "Przemyslaw Pluta <przemyslawplutadev@gmail.com> (http://przemyslawpluta.com)",
"description": "Select and download videos and handouts from university.mongodb.com courses",
"main": "./mongo-edu",
@@ -33,21 +33,21 @@
"cheerio": "~0.19.0",
"colors": "~1.1.2",
"easy-table": "~1.0.0",
- "filesize": "~3.1.3",
+ "filesize": "~3.1.4",
"glob": "~6.0.1",
"inquirer": "~0.11.0",
"lodash": "~3.10.1",
"mkdirp": "~0.5.1",
"mv": "~2.1.1",
"path-extra": "~3.0.0",
- "pretty-error": "^1.2.0",
+ "pretty-error": "~1.2.0",
"progress": "~1.1.8",
- "request": "~2.65.0",
+ "request": "~2.67.0",
"request-progress": "~0.3.1",
- "rimraf": "~2.4.3",
+ "rimraf": "~2.4.4",
"unzip": "~0.1.11",
"which": "~1.2.0",
- "yargs": "~3.29.0",
+ "yargs": "~3.30.0",
"youtube-dl": "~1.10.5"
},
"engines": {