zfcsoftware / cf-clearance-scraper

This package provides an api that returns cookies (cf-clearance) that you can request on a website protected by Cloudflare WAF (corporate or normal) without being blocked by WAF.
MIT License
91 stars 7 forks source link

Changing Browser Limit and Timeout Settings #3

Closed ismail-amouma closed 2 weeks ago

ismail-amouma commented 1 month ago

Hello, I hope you are doing well. The repository works fine for me; I have just one issue. I tried running it from the source code, and it’s working, but the timeout is still 30000 ms even though I changed it to 50000 ms. It still remains constant at 30000 ms.

I also tried installation from Docker and changing the inputs from the Docker run command, but nothing changed. I know the values were not changed because I received a 30000 ms timeout error, even after changing the value.

Please, can you provide any fix for this? Thank you so much for the repository.

zfcsoftware commented 1 month ago

Hi, thanks for your use. Can you try changing the timeOut variable in your env file?

https://github.com/zfcsoftware/cf-clearance-scraper/blob/f2120c8c58976c42edb5346df553a9423878e15e/index.js#L12

ismail-amouma commented 1 month ago

hi thanks for response ,Yes, what I did first was set this:

global.browserLength = 0;
global.browserLimit = process.env.browserLimit || 50;
global.timeOut = process.env.timeOut || 40000;

It didn't work at first, so I then put:

global.browserLength = 0;
global.browserLimit = 50;
global.timeOut = 40000;

I still have those 30000 timeouts in the JSON response sometimes, so I know the value didn't actually change.

zfcsoftware commented 1 month ago

There doesn't seem to be a problem with the library. I just tested it and it's probably Cloudflare timeout limit or ngnix timeout limit. Please test it in your local area. image

ismail-amouma commented 2 weeks ago

Oh yes, it seems a timeout error was issued with Cloudflare. Thank you for the fix for the browser limit in the last update; that will help me a lot in my project. Thank you so much!