|
|
@ -25,6 +25,7 @@ module.exports = function createPastebinComScraper(options = {}) {
|
|
|
|
|
|
|
|
|
|
|
|
queue.define("fetchPaste", (task) => {
|
|
|
|
queue.define("fetchPaste", (task) => {
|
|
|
|
return Promise.try(() => {
|
|
|
|
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(`http://pastebin.com/api_scrape_item.php?i=${task.pasteKey}`);
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
if (response.statusCode !== 200) {
|
|
|
|
if (response.statusCode !== 200) {
|
|
|
|