diff --git a/lib/leetcode_client.js b/lib/leetcode_client.js index 0d4fe795..a54b1a39 100644 --- a/lib/leetcode_client.js +++ b/lib/leetcode_client.js @@ -116,8 +116,11 @@ var aceCtrl = { }; leetcodeClient.getProblem = function(problem, cb) { - request(problem.link, function(e, resp, body) { + var opts = makeOpts(); + opts.url = problem.link; + request(opts, function(e, resp, body) { e = checkError(e, resp, 200); + // FIXME: if session expired, this will still return 200 if (e) return cb(e); var $ = cheerio.load(body);