summaryrefslogtreecommitdiff
path: root/lib/login.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/login.js')
-rw-r--r--lib/login.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/login.js b/lib/login.js
index 968b518..d7f3fdf 100644
--- a/lib/login.js
+++ b/lib/login.js
@@ -29,7 +29,7 @@ module.exports = {
'use strict';
var url = host,
- bar = new ProgressBar('[' + '>'.magenta + '] Searching [:bar] :percent', { complete: '=', incomplete: ' ', width: 20, total: 5 }),
+ bar = new ProgressBar('>'.magenta + ' Searching [:bar] :percent', { complete: '=', incomplete: ' ', width: 20, total: 5 }),
CSRFTokenCookie = '',
login = function login(token) {
@@ -111,7 +111,7 @@ module.exports = {
'use strict';
- request({ url: opt.url, jar: jar }, function get(err, res, body) {
+ request({ url: opt.url, jar: jar, headers: { 'Referer' : opt.url.replace('course_wiki', 'syllabus'), }}, function get(err, res, body) {
if (err !== null) { return callback(err, null); }
if (res.statusCode === 404) { return callback(null, [], true); }