Scrape over HTTPS instead

master
Sven Slootweg 7 years ago
parent c12e1b4db0
commit bd05f9535a

@ -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) => {

Loading…
Cancel
Save