Compare commits

...

2 Commits

@ -23,10 +23,12 @@ module.exports = function createPastebinComScraper(options = {}) {
let knownPastes = [];
let previousKnownPastes = [];
debug(`Initializing with pasteInterval ${options.pasteInterval}, listInterval ${options.listInterval}, and listLimit ${options.listLimit}`);
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!
@ -53,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