diff options
author | przemyslawpluta <przemekpluta@hotmail.com> | 2014-04-02 06:34:03 +0100 |
---|---|---|
committer | przemyslawpluta <przemekpluta@hotmail.com> | 2014-04-02 06:34:03 +0100 |
commit | 71df97153e9f678e6e7ed8cdabe017480bba669a (patch) | |
tree | f56ff8283e2be3072f9145802fadcdc26057b9e1 /lib | |
parent | 0652bb06df11062bbeb12ac087968c6b547c15f2 (diff) | |
download | mongo-edu-71df97153e9f678e6e7ed8cdabe017480bba669a.zip |
host update
Diffstat (limited to 'lib')
-rw-r--r-- | lib/login.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/login.js b/lib/login.js index 706eb5a..12de9e4 100644 --- a/lib/login.js +++ b/lib/login.js @@ -11,7 +11,7 @@ var request = require('request'), ProgressBar = require('progress'), _ = require('lodash'); -var jar = request.jar(), host = 'https://education.mongodb.com'; +var jar = request.jar(), host = 'https://university.mongodb.com'; function addCookies(cookies, url) { _.each(cookies, function cookies(cookie) { jar.setCookie(cookie, url + '/login'); }); @@ -121,11 +121,10 @@ module.exports = { if (item.href.match(/(wiki\/M101|wiki\/M102|wiki\/C100|wiki\/M202|wiki\/list-youtube-links)/)) { return item; } }); - return callback(null, _.map(getCourses, function map(item) { return { name: !item.href.match(/wiki\/list-youtube-links/) ? item.href.replace(tag, '').slice(0, -1).slice(1).replace(/-/g, ' ').replace(/\//g, ': ') : item.text, value: item.href }; })); + return callback(null, _.map(getCourses, function map(item) { return { name: item.text, value: item.href }; })); } else { - $('div.syllabus tbody tr').map(function map(i, item) { var current = $(item), text = current.children().first().text(), href = $(current.find('a')).attr('href'); if (href) { |