Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite 503 problem cloudflare page #180

Open
linkkader opened this issue Jun 8, 2022 · 8 comments
Open

infinite 503 problem cloudflare page #180

linkkader opened this issue Jun 8, 2022 · 8 comments

Comments

@linkkader
Copy link

hi i always stuck on this cloudflare page https://anime-flix.net/

import '../bin/utils/string.dart';
import 'package:puppeteer/plugins/stealth.dart';
import 'package:puppeteer/puppeteer.dart';

Future<void> main() async {
  puppeteer.plugins.add(StealthPlugin());
  var browser = await puppeteer.launch(headless: false, args: [

  ],noSandboxFlag: true, ignoreHttpsErrors: true,ignoreDefaultArgs: true
  );
  var page = ( await browser.pages).first;
  await page.setJavaScriptEnabled(true);
  await page.goto("https://anime-flix.net/");
}

Screen Shot 2022-06-08 at 03 30 55

@Wizzel1
Copy link
Contributor

Wizzel1 commented Dec 27, 2022

@linkkader have you found a solution?
@xvrh any advice on how to solve this? I am stuck on a Cloudflare page as well.

My scenario is a bit different though, I need to solve a challenge like this:
Unbenannt

but even if I solve it manually, I am stuck in an infinite redirection loop.

Cloudflare seems to detect the chromium instance because I am running puppeteer locally so the IP should be safe, right?

I have tried to launch puppeteer with the StealthPlugin and add a few extra steps, but no success:

    await page.setJavaScriptEnabled(true);
    await page.setUserAgent(
      'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
    );
    await page.setExtraHTTPHeaders({
      'Accept-Language': 'en-US,en;q=0.9',
    });

@linkkader
Copy link
Author

@Wizzel1 yes there is a ploblem with StealthPlugin() in my case i solve it by directly modify it
i compare it with javascript StealthPlugin

@Wizzel1
Copy link
Contributor

Wizzel1 commented Dec 27, 2022

@linkkader thats great, would you mind sharing your modifications?

@Zhairgling
Copy link

@Wizzel1 @linkkader any update ?

@Wizzel1
Copy link
Contributor

Wizzel1 commented Jan 30, 2023

@Zhairgling Unfortunately not

@linkkader
Copy link
Author

@Wizzel1 @Zhairgling you can check here the modification i add
https://github.com/linkkader/puppeteer-dart
let me know if it works

@Zhairgling
Copy link

@Wizzel1 @Zhairgling you can check here the modification i add https://github.com/linkkader/puppeteer-dart let me know if it works

working for me. Thanks

@Wizzel1
Copy link
Contributor

Wizzel1 commented Apr 20, 2023

@linkkader Sorry for my late answer. Your PR did not work for me, unfortunately.

I had to set the pages userAgent to make it work in my case.

  page = await browser.newPage();
  await page.setUserAgent(
    'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0',
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants