use e621 iamge mirror for e926

pull/6/head
Phil 2021-05-31 16:21:45 +02:00
parent 4803d2333b
commit da2a875503
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ export default class e621 implements ScrapeEngine {
// Set image url // Set image url
const downloadEl = document.querySelector("#image-download-link > a") as HTMLAnchorElement; const downloadEl = document.querySelector("#image-download-link > a") as HTMLAnchorElement;
post.contentUrl = downloadEl?.href; // e926 doesnt allow downloads from direct links for some reason. so as a workaround we are using the e621 mirror; theirfor replacing
post.contentUrl = downloadEl?.href.replace(/\.e926\.net\/data/, '.e621.net/data');
if (post.contentUrl == undefined) { if (post.contentUrl == undefined) {
return result; return result;