Removed duplicate post link from imgur logs

This commit is contained in:
ThePendulum 2018-07-07 04:03:42 +02:00
parent b18d235828
commit 3c9675ea85
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ async function imgurAlbumApi(post) {
}, },
}).then(res => res.json()).then((res) => { }).then(res => res.json()).then((res) => {
if (res.status !== 200) { if (res.status !== 200) {
throw new Error(`Could not fetch info for imgur album '${post.host.id}': ${res.data.error} (${post.permalink})`); throw new Error(`Could not fetch info for imgur album '${post.host.id}': ${res.data.error}`);
} }
const extract = config.library.album.extractSingleItem && res.data.images.length === 1; const extract = config.library.album.extractSingleItem && res.data.images.length === 1;
@ -54,7 +54,7 @@ async function imgurAlbum(post) {
return imgurAlbumApi(post); return imgurAlbumApi(post);
} }
throw new Error(`Could not fetch info for imgur album '${post.host.id}' (${res.statusText}) no API fallback configured (${post.permalink})`); throw new Error(`Could not fetch info for imgur album '${post.host.id}' (${res.statusText}) no API fallback configured`);
} }
const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1]; const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1];

View File

@ -10,7 +10,7 @@ async function imgurImageApi(post) {
}, },
}).then(res => res.json()).then((res) => { }).then(res => res.json()).then((res) => {
if (res.status !== 200) { if (res.status !== 200) {
throw new Error(`Could not fetch info for imgur image '${post.host.id}': ${res.data.error} (${post.permalink})`); throw new Error(`Could not fetch info for imgur image '${post.host.id}': ${res.data.error}`);
} }
return { return {
@ -39,7 +39,7 @@ async function imgurImage(post) {
return imgurImageApi(post); return imgurImageApi(post);
} }
throw new Error(`Could not scrape info for imgur image '${post.host.id}' (${res.statusText}), no API fallback configured (${post.permalink})`); throw new Error(`Could not scrape info for imgur image '${post.host.id}' (${res.statusText}), no API fallback configured`);
} }
const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1]; const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1];