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

Workaround for cloudflare protected websites #1715

Open
Slasar41 opened this issue Oct 10, 2024 · 3 comments
Open

Workaround for cloudflare protected websites #1715

Slasar41 opened this issue Oct 10, 2024 · 3 comments

Comments

@Slasar41
Copy link
Collaborator

Slasar41 commented Oct 10, 2024

Preparation

  • Install python. Enable "Add python.exe to PATH" from the python installation screen
  • Create any file in {FMD Directory}\lua\websitebypass and rename it to use_webdriver with no extenstion

Method 1: FlareSolverr (64-bit only)

  • Install python package requests with pip install requests
  • Download FlareSolverr. Extract it inside {FMD Directory}\lua\websitebypass
  • Make sure the .exe is in {FMD Directory}\lua\websitebypass\flaresolverr\flaresolverr.exe
  • Run flaresolverr.exe and wait for it to say Serving on http://0.0.0.0:8191
  • Paste the site url into FMD to get the manga info and chapters
  • Check Flaresolverr if any incoming requests are made and if they are solving the challenge and getting a 200 OK response

To test if everything is working properly, run in CMD or Powershell from your {FMD Directory}\lua\websitebypass directory the following command: python customcloudflare.py "https://dragontea.ink" to see if any errors pop up or not

Method 1a: FlareSolverr Fork (64-bit only)

  • If Flaresolverr has any issues solving requests make sure to check any issues and pull requests on their GitHub first
  • If there is a fork or code update without a release that fixes the issues, download the repo from GitHub by clicking <> Code in green button and click Download ZIP. The current working fork is here
  • Extract the repo clone and from inside the extracted directory, run in CMD or Powershell the following command: python src/flaresolverr.py
  • Follow the steps from method 1 from after running flaresolverr.exe

Method 2: rookiepy

  • Install python package rookiepy with pip install rookiepy
  • Open the site you want to get cookies for in any of the following browsers: Chrome, Edge, Firefox, Opera, Opera GX
  • Close the tab or browser to ensure the cookies are saved to file
  • Paste the site url into FMD to get the manga info and chapters
  • Open FMD log to see if errors pop up or not. You can ignore Please make sure FlareSolverr is running.
  • Alternatively check Options -> Websites -> Advanced and search for your site to see if cookies were applied correctly
  • If cookies were applied correctly but the manga info doesn't load, make sure you've recently visited the site in your browser and the cookies haven't expired

* Currently has issues decrypting cookies from Chrome and doesn't work. Use an alternative browser until the issue is fixed

To test if everything is working properly, run in CMD or Powershell from your {FMD Directory}\lua\websitebypass directory the following command: python cloudflare.py "https://dragontea.ink" to see if any errors pop up or not

Manual workaround
For Chromium based browser

  • Open website in browser -> press F12 -> select Network tab
  • In the Name section, select the first one -> see Headers tab and search for cookie and user-agent, copy all of it
  • In FMD, go to Options -> Websites -> Advanced -> {Website Name}, change Enabled option to True, paste the cookie and user-agent from browser
@Slasar41 Slasar41 pinned this issue Oct 10, 2024
@xavimaa
Copy link

xavimaa commented Oct 17, 2024

Hello,

Thank you for this very well-explained guide!

Is there a possibility to use flaresolverr hosted on Docker?

I apologize if this question requires opening a new issue.

Thanks again 🙏

@Slasar41
Copy link
Collaborator Author

Sorry, I don't use Docker.

@NhKPaNdA
Copy link

NhKPaNdA commented Nov 5, 2024

Is there a possibility to use flaresolverr hosted on Docker?

I tried out using a Docker and it did work in the end. I had to make sure the docker was hosting through the vm into the host machine so the cloudflare bypass could correctly connect to it through localhost.

Even though it does work I realised it does take a lot longer per connection and will generally timeout with the default 60s when connecting to the docker instead of the .exe or cmd run python which roughly takes ~20s.

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

No branches or pull requests

3 participants