|
|
|
@ -32,7 +32,7 @@ module.exports = function createPastebinComScraper(options = {}) {
|
|
|
|
|
queue.define("fetchPaste", (task) => {
|
|
|
|
|
return Promise.try(() => {
|
|
|
|
|
debug(`Fetching paste ID ${task.pasteKey}...`)
|
|
|
|
|
return bhttp.get(`https://pastebin.com/api_scrape_item.php?i=${task.pasteKey}`);
|
|
|
|
|
return bhttp.get(`https://scrape.pastebin.com/api_scrape_item.php?i=${task.pasteKey}`);
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if (response.statusCode !== 200) {
|
|
|
|
|
if (response.statusCode >= 500 && response.statusCode < 600) {
|
|
|
|
@ -63,7 +63,7 @@ module.exports = function createPastebinComScraper(options = {}) {
|
|
|
|
|
start: function startScraper() {
|
|
|
|
|
loop = promiseSetInterval(() => {
|
|
|
|
|
return Promise.try(() => {
|
|
|
|
|
return bhttp.get(`https://pastebin.com/api_scraping.php?limit=${defaultValue(options.listLimit, 100)}`, {
|
|
|
|
|
return bhttp.get(`https://scrape.pastebin.com/api_scraping.php?limit=${defaultValue(options.listLimit, 100)}`, {
|
|
|
|
|
noDecode: true /* Because Pastebin.com errors aren't JSON... */
|
|
|
|
|
});
|
|
|
|
|
}).then((response) => {
|
|
|
|
|