summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprzemyslawpluta <przemekpluta@hotmail.com>2015-04-09 18:15:19 +0100
committerprzemyslawpluta <przemekpluta@hotmail.com>2015-04-09 18:15:19 +0100
commit58e1c1cb7171ec3648d63c5dbc8034bedb23994f (patch)
tree6b10cb8bdefe0640978d8a455b2ae941fba14081
parent9980a4702dfd86d515ab326147b5c19a31db8663 (diff)
downloadmongo-edu-58e1c1cb7171ec3648d63c5dbc8034bedb23994f.zip
update
youtube regex cleanup version bump
-rw-r--r--lib/configure.js2
-rw-r--r--lib/courseware.js6
-rw-r--r--lib/initialize.js2
-rw-r--r--lib/login.js2
-rw-r--r--lib/options.js2
-rw-r--r--lib/prompts.js2
-rw-r--r--lib/validate.js2
-rw-r--r--lib/videos.js2
-rw-r--r--mongo-edu.js2
-rw-r--r--package.json24
10 files changed, 24 insertions, 22 deletions
diff --git a/lib/configure.js b/lib/configure.js
index 76a2bdd..c83f2f3 100644
--- a/lib/configure.js
+++ b/lib/configure.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/courseware.js b/lib/courseware.js
index 8aa0d01..7d7ca7c 100644
--- a/lib/courseware.js
+++ b/lib/courseware.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
@@ -15,7 +15,7 @@ var fs = require('fs'),
_ = require('lodash');
var isWin = /^win/.test(process.platform),
- camo = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36' };
+ camo = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36' };
function saveData(argv, details, data, callback) {
@@ -49,6 +49,8 @@ function listVideos(url, jar, id, callback) {
pageView = $('div.col-sm-9.course-content section').html(),
getVideoIds = (pageView) ? pageView.match(/(.0:)(.*?)(&)/g) : pageView;
+ if (getVideoIds && getVideoIds.length > 1) { getVideoIds = [getVideoIds[0]]; }
+
getVideoIds = (!getVideoIds) ? [] : getVideoIds.map(function map(item) { return { id: id, video: 'https://youtu.be/' + item.replace('.0:','').replace('&','')}; });
callback(null, getVideoIds);
diff --git a/lib/initialize.js b/lib/initialize.js
index a3c6834..ae93802 100644
--- a/lib/initialize.js
+++ b/lib/initialize.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/login.js b/lib/login.js
index 5b13007..88b97f0 100644
--- a/lib/login.js
+++ b/lib/login.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/options.js b/lib/options.js
index 707beb4..9cfd300 100644
--- a/lib/options.js
+++ b/lib/options.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/prompts.js b/lib/prompts.js
index 857c7ce..7e90cc5 100644
--- a/lib/prompts.js
+++ b/lib/prompts.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/validate.js b/lib/validate.js
index d0b5e9e..4b561d4 100644
--- a/lib/validate.js
+++ b/lib/validate.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/lib/videos.js b/lib/videos.js
index 57764fe..d389479 100644
--- a/lib/videos.js
+++ b/lib/videos.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/mongo-edu.js b/mongo-edu.js
index 9e98b1b..e798574 100644
--- a/mongo-edu.js
+++ b/mongo-edu.js
@@ -1,7 +1,7 @@
/*
* mongo-edu
*
- * Copyright (c) 2014 Przemyslaw Pluta
+ * Copyright (c) 2014-2015 Przemyslaw Pluta
* Licensed under the MIT license.
* https://github.com/przemyslawpluta/mongo-edu/blob/master/LICENSE
*/
diff --git a/package.json b/package.json
index 18ba888..b2d7a10 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mongo-edu",
"preferGlobal": true,
- "version": "0.2.6",
+ "version": "0.2.7",
"author": "Przemyslaw Pluta <przemyslawplutadev@gmail.com> (http://przemyslawpluta.com)",
"description": "Select and download videos and handouts from university.mongodb.com courses",
"main": "./mongo-edu",
@@ -30,24 +30,24 @@
],
"license": "MIT",
"dependencies": {
- "cheerio": "~0.18.0",
+ "cheerio": "~0.19.0",
"colors": "~1.0.3",
"easy-table": "~0.3.0",
- "filesize": "~3.1.0",
- "glob": "~4.4.0",
- "inquirer": "~0.8.0",
- "lodash": "~3.3.0",
+ "filesize": "~3.1.2",
+ "glob": "~5.0.3",
+ "inquirer": "~0.8.2",
+ "lodash": "~3.6.0",
"mkdirp": "~0.5.0",
"mv": "~2.0.3",
- "path-extra": "~0.3.0",
+ "path-extra": "~1.0.2",
"progress": "~1.1.8",
- "request": "~2.53.0",
+ "request": "~2.55.0",
"request-progress": "~0.3.1",
- "rimraf": "~2.2.8",
+ "rimraf": "~2.3.2",
"unzip": "~0.1.11",
- "which": "~1.0.8",
- "yargs": "~3.2.1",
- "youtube-dl": "~1.10.0"
+ "which": "~1.0.9",
+ "yargs": "~3.7.0",
+ "youtube-dl": "~1.10.2"
},
"engines": {
"node": ">= 0.8.x"