Giter VIP home page Giter VIP logo

Comments (4)

ngosang avatar ngosang commented on June 23, 2024

I can't reproduce the issue. It seems the site disabled Cloudflare protection, at least form me.

from flaresolverrsharp.

MisterMcDuck avatar MisterMcDuck commented on June 23, 2024

Strange. I receive the following when I try it:
fs1

I also have tried it on my Linux machine, and get the same general error with .NET core:

Debug  net5.0  master  ✎  $  dotnet FlareSolverrSharp.Sample.dll
Unhandled exception. System.AggregateException: One or more errors occurred. (The cookies provided by FlareSolverr are not valid)
 ---> FlareSolverrSharp.Exceptions.FlareSolverrException: The cookies provided by FlareSolverr are not valid
   at FlareSolverrSharp.ClearanceHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in /home/chris/Projects/FlareSolverrSharp/src/FlareSolverrSharp/ClearanceHandler.cs:line 111
   at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at FlareSolverrSharp.Sample.ClearanceHandlerSample.SampleGet() in /home/chris/Projects/FlareSolverrSharp/sample/FlareSolverrSharp.Sample/ClearanceHandlerSample.cs:line 25
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at FlareSolverrSharp.Sample.Program.Main() in /home/user/Projects/FlareSolverrSharp/sample/FlareSolverrSharp.Sample/Program.cs:line 8
fish: “dotnet FlareSolverrSharp.Sample…” terminated by signal SIGABRT (Abort)

I wonder if my IP address has any effect. I guess I could spin up an EC2 instance to see if the behavior is any different.

from flaresolverrsharp.

ngosang avatar ngosang commented on June 23, 2024

As I said, I can't reproduce the issue but it could be a false positive. If you take a look that the IsChanllengeDetected method I'm just checking the "server" header and the HTTP response code. There are websites hosted in Cloudflare CDN that can be detected by that method but they doesn't have challenges. Maybe you could try to open the URL in your web browser with DevTools (F12) => Network enabled to see what is happening.

from flaresolverrsharp.

MisterMcDuck avatar MisterMcDuck commented on June 23, 2024

I was able to solve the issue by forcing my HttpClient web requests to use 2.0:

client.DefaultRequestVersion = Version.Parse("2.0");

Thanks for the help along the way

from flaresolverrsharp.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.