Skip to content

Commit

Permalink
FIX : ReadComicOnline.li : workaround for Recaptcha & nasty ads (#5951)
Browse files Browse the repository at this point in the history
* Request : handle ReadComic Recaptcha

* Blacklist : add some ReadComicOnline need hosts

and sorted list

* KissComic : handle captcha for pages
  • Loading branch information
MikeZeDev authored Jun 28, 2023
1 parent 480591e commit 54f80c3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
12 changes: 8 additions & 4 deletions src/web/mjs/connectors/KissComic.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ export default class KissComic extends Connector {

async _getPages(chapter) {
const script = `
new Promise(resolve => resolve(lstImages));
new Promise((resolve, reject) => {
setTimeout(() => {
resolve(lstImages);
}, 1000);
});
`;

const uri = new URL(chapter.id, this.url);
uri.searchParams.set('readType', 1);
uri.searchParams.set('quality', 'hq');
let request = new Request(uri, this.requestOptions);
return Engine.Request.fetchUI(request, script);
const request = new Request(uri, this.requestOptions);
return Engine.Request.fetchUI(request, script, 60000, true);
}
}
}
20 changes: 12 additions & 8 deletions src/web/mjs/engine/Blacklist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default class Blacklist {
'*://*.24vunvrv.com/*',
'*://*.33across.com/*',
'*://*.360yield.com/*',
//'*://*.accounts.google.com/*',
'*://*.addthis.com/*',
'*://*.addthisedge.com/*',
'*://*.adf.ly/*',
Expand Down Expand Up @@ -38,7 +37,6 @@ export default class Blacklist {
'*://*.casalemedia.com/*',
'*://*.chatango.com/*',
'*://*.class2deal.com/*',
//'*://*.cloudfront.net/*',
'*://*.cloudfront.net/alpaca.min.css',
'*://*.cnzz.com/*',
'*://*.cobalten.com/*',
Expand All @@ -51,30 +49,27 @@ export default class Blacklist {
'*://*.criteo.net/*',
'*://*.defpush.com/*',
'*://*.digitru.st/*',
//'*://*.discordapp.com/*',
'*://*.doubleclick.net/*',
'*://*.dpypzvjarj.com/*',
'*://*.dtscout.com/*',
'*://*.e-v-e-n.me/*',
'*://*.eehuzaih.com/*',
'*://*.elasticad.net/*',
'*://*.eventronbesed.info/*',
'*://*.evergreensame.com/*',
'*://*.exosrv.com/*',
//'*://*.facebook.com/*',
//'*://*.facebook.net/*',
//'*://*.fbcdn.net/*',
'*://*.fingahvf.top/*',
'*://*.fqtag.com/*',
'*://*.fundingchoices.google.com/*',
'*://*.genieessp.com/*',
'*://*.genieessp.com/*',
'*://*.google-analytics.com/*',
'*://*.google.com/ads/*',
'*://*.google.com/adsense/*',
'*://*.googlesyndication.com/*',
'*://*.googletagmanager.com/*',
'*://*.googletagservices.com/*',
'*://*.graveuniversalapologies.com/*',
//'*://*.gstatic.com/*',
'*://*.h12-media.com/*',
'*://*.histats.com/*',
'*://*.hotjar.com/*',
Expand All @@ -86,6 +81,8 @@ export default class Blacklist {
'*://*.inter1ads.com/*',
'*://*.jeconotinhi.info/*',
'*://*.jigsawthirsty.com/*',
'*://*.jnyyryjarlwbj.top/*',
'*://*.jsdelivr.net/gh/vli-platform/adb-analytics*',
'*://*.juicyads.com/*',
'*://*.koindut.com/*',
'*://*.lkqd.net/*',
Expand Down Expand Up @@ -142,6 +139,13 @@ export default class Blacklist {
'*://*.zdaptrksg.com/*',
'*://*.zeusadx.com/*',
'*://*.zryydi.com/*',
//'*://*.accounts.google.com/*',
//'*://*.cloudfront.net/*',
//'*://*.discordapp.com/*',
//'*://*.facebook.com/*',
//'*://*.facebook.net/*',
//'*://*.fbcdn.net/*',
//'*://*.gstatic.com/*',
];
}

Expand All @@ -150,4 +154,4 @@ export default class Blacklist {
this.patterns.push( pattern );
}
}
}
}
5 changes: 5 additions & 0 deletions src/web/mjs/engine/Request.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ export default class Request {
return handleAutomaticRedirect();
}
//ReadComicOnline
if(document.querySelector('form#formVerify[action*="/Special/AreYouHuman"]')) { // Recaptcha
return handleUserInteractionRequired();
}
// CloudFlare Checks
let cfCode = document.querySelector('.cf-error-code');
if(cfCode) {
Expand Down

0 comments on commit 54f80c3

Please sign in to comment.