Closed waltaki closed 4 years ago
Hi @waltaki,
Yes, this a bug.
It's not currently possible to abort requests that were redirected due to challenge solving. The number of challenges to solve can be configured by using the challengesToSolve
option (defaults to 3). The request can be aborted during normal redirects or if challenges aren't encountered.
const cloudscraper = require('cloudscraper');
const request = cloudscraper.get('https://example.com')
request.abort()
Workaround:
cf_clearance
cookie in advance e.g. prefetch a protected url.PR's welcome.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
For example, I need to download a file. In the beginning I will get the headers, check them, for example for the file extension, and if this extension does not suit me, I go to stop receiving the file, do abort.
How do I imagine it:
Also, implementation would be very good as
Interceptor
, that is, to prevent packets from being received until Icontinue
.How to implement this?