Accounting for actualid_d.jpg imgur pattern. Added debug argument to print full stack trace on error.

This commit is contained in:
2024-09-11 05:16:56 +02:00
parent e950a9ac54
commit 91550406fe
4 changed files with 30 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ async function imgurAlbum(post) {
const html = await res.text();
if (res.status !== 200) {
throw new Error(`Could not fetch info for imgur image '${post.host.id}': '${res.data.error}'`);
throw new Error(`Could not fetch info for imgur image '${post.host.id}': '${res.statusText}'`);
}
const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1];

View File

@@ -7,7 +7,7 @@ async function imgurImage(post) {
const html = await res.text();
if (res.status !== 200) {
throw new Error(`Could not fetch info for imgur image '${post.host.id}': '${res.data.error}'`);
throw new Error(`Could not fetch info for imgur image '${post.host.id}': '${res.statusText}'`);
}
const dataString = html.replace(/\s+/g, ' ').match(/}}, item:(.*)}; var PREBID_TIMEOUT/)[1];