From 1e75ccd734397171377634558a13392c48a2fcdd Mon Sep 17 00:00:00 2001 From: "Mark Neil C. Aves" Date: Mon, 7 May 2018 14:00:16 +0800 Subject: [PATCH] Update server.js Updated the url parameter to include rejectUnauthorized : false. This is a fix to the SELF_SIGNED_CERT_IN_CHAIN error because http is redirecting to https --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index a11ca36..35af51d 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,10 @@ app.get('/scrape', function(req, res){ // Let's scrape Anchorman 2 url = 'http://www.imdb.com/title/tt1229340/'; - request(url, function(error, response, html){ + request({ + url : url, + rejectUnauthorized : false + }, function(error, response, html){ if(!error){ var $ = cheerio.load(html);