From 82b7f383361b5d52f2baaa9493a46d6d03d83eb6 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 11 Sep 2024 05:16:57 +0200 Subject: [PATCH] Removed duplicate post link from imgur logs --- src/methods/imgurAlbum.js | 4 ++-- src/methods/imgurImage.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/methods/imgurAlbum.js b/src/methods/imgurAlbum.js index 87e56c4..6ffee3d 100644 --- a/src/methods/imgurAlbum.js +++ b/src/methods/imgurAlbum.js @@ -11,7 +11,7 @@ async function imgurAlbumApi(post) { }, }).then(res => res.json()).then((res) => { 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; @@ -54,7 +54,7 @@ async function imgurAlbum(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]; diff --git a/src/methods/imgurImage.js b/src/methods/imgurImage.js index 06c18cb..ae1c89b 100644 --- a/src/methods/imgurImage.js +++ b/src/methods/imgurImage.js @@ -10,7 +10,7 @@ async function imgurImageApi(post) { }, }).then(res => res.json()).then((res) => { 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 { @@ -39,7 +39,7 @@ async function imgurImage(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];