Add support for DDoS-GUARD challenge

This commit is contained in:
ngosang
2022-01-30 20:36:38 +01:00
parent bc6ac68e52
commit fdd1d245f4
2 changed files with 34 additions and 1 deletions

View File

@@ -7,7 +7,10 @@ import log from "../services/log";
**/
const BAN_SELECTORS = ['.text-gray-600'];
const CHALLENGE_SELECTORS = ['#trk_jschal_js', '.ray_id', '.attack-box', '#cf-please-wait'];
const CHALLENGE_SELECTORS = [
'#trk_jschal_js', '.ray_id', '.attack-box', '#cf-please-wait', // CloudFlare
'#link-ddg' // DDoS-GUARD
];
const CAPTCHA_SELECTORS = ['input[name="cf_captcha_kind"]'];
export default async function resolveChallenge(url: string, page: Page, response: Response): Promise<Response> {