Skip to content

Commit

Permalink
Fix BeeToon: filter fake images (#6597)
Browse files Browse the repository at this point in the history
* Fix BeeToon: filter fake images

Fixes #6592

* Update BeeToon.mjs
  • Loading branch information
MikeZeDev authored Dec 30, 2023
1 parent 4bdece2 commit 4cd496c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/web/mjs/connectors/BeeToon.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class BeeToon extends WordPressZbulu {
}

canHandleURI(uri) {
return /(ww2\.)?beetoon\.net/.test(uri.hostname);
return /(ww\d+\.)?beetoon\.net/.test(uri.hostname);
}

async _initializeConnector() {
Expand All @@ -37,4 +37,15 @@ export default class BeeToon extends WordPressZbulu {
};
});
}
}

async _getPages(chapter) {
const pages = await super._getPages(chapter);
return pages
.map( page => {
let link = new URL(page);
link = link.searchParams.get('url') || link; //deproxify url if needed
return link.href;
})
.filter(page => !page.includes('/gadgets/proxy?'));//remove fake images (that were not deproxified)
}
}

0 comments on commit 4cd496c

Please sign in to comment.