From bd05f9535a60ab4b5bcdf33b4f46e14e1d223178 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Thu, 13 Jul 2017 08:56:39 +0200 Subject: [PATCH] Scrape over HTTPS instead --- src/scrapers/pastebin-com.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scrapers/pastebin-com.js b/src/scrapers/pastebin-com.js index c3d11f4..4136d3c 100644 --- a/src/scrapers/pastebin-com.js +++ b/src/scrapers/pastebin-com.js @@ -28,7 +28,7 @@ module.exports = function createPastebinComScraper(options = {}) { queue.define("fetchPaste", (task) => { return Promise.try(() => { debug(`Fetching paste ID ${task.pasteKey}...`) - return bhttp.get(`http://pastebin.com/api_scrape_item.php?i=${task.pasteKey}`); + return bhttp.get(`https://pastebin.com/api_scrape_item.php?i=${task.pasteKey}`); }).then((response) => { if (response.statusCode !== 200) { // FIXME: Retry! @@ -55,7 +55,7 @@ module.exports = function createPastebinComScraper(options = {}) { start: function startScraper() { loop = promiseSetInterval(() => { return Promise.try(() => { - return bhttp.get(`http://pastebin.com/api_scraping.php?limit=${defaultValue(options.listLimit, 100)}`, { + return bhttp.get(`https://pastebin.com/api_scraping.php?limit=${defaultValue(options.listLimit, 100)}`, { noDecode: true /* Because Pastebin.com errors aren't JSON... */ }); }).then((response) => {