Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Getting 403 on the captcha challenge page even when specifying an onCaptcha callback #291

Closed
Bassintag opened this issue Nov 30, 2019 · 8 comments

Comments

@Bassintag
Copy link

Cloudscraper version: v4.4.0
Node version: v12.10.0
URL: https://raffle.bstn.com/

When accessing this page the captcha page is always required, before last cloudflare update cloudscraper would work fine by sending the challenge for it to be solved but since the recent update it just throws a StatusCodeError (status being 403).

const headers = {
            'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
            'Accept-Language': 'en-US,en;q=0.5',
            'Accept-Encoding': 'gzip',
            'Connection': 'keep-alive',
            'Upgrade-Insecure-Requests': '1',
            'TE': 'Trailers',
};
const session = request.defaults({
            followAllRedirects: true,
            jar: request.jar(),
            gzip: true,
            onCaptcha() { console.log('test'); /* Not actual code but never called */ },
            headers,
});
const page = await session.get({
            uri: registerUrl,
});
@Eastkap
Copy link

Eastkap commented Dec 3, 2019

Are you sure you are using the cloudscraper library ? From what I can see you are only using the requests one :(
Also, it looks to me you are making a bad bot ;)

@kr4ssi
Copy link

kr4ssi commented Dec 3, 2019

I get "Cloudflare challenge loop" Error

@minas90
Copy link

minas90 commented Dec 3, 2019

I have the same or similar issue for this website right now: https://censor.net.ua/
CloudFlare is active for it for an hour or so.
It's working fine locally, but on aws ec2 instance I get error: CaptchaError: captcha
Also when I do wget locally, I get status 503, but on ec2 I get 403: Forbidden

What can be wrong? Maybe it's blocked for some specific location?

@Eastkap
Copy link

Eastkap commented Dec 3, 2019

What’s your wget command? @minas90
You should get the same status code or at least not a 5xx even with curl/wget

@kr4ssi could you give more details about your request/code/ library version etc?

@SFx2018
Copy link

SFx2018 commented Dec 3, 2019

I have same error (403) for ogusers.com since few days :<

@codemanki
Copy link
Owner

4.5.0 was just published

@SFx2018
Copy link

SFx2018 commented Dec 3, 2019

it works now, but I'm getting captcha loop, I think this issue is not related to this library ;<

@minas90
Copy link

minas90 commented Dec 3, 2019

@Eastkap wget https://censor.net.ua/

When CloudFlare is active for a website, I usually get 503. Actually it's how I detect if CF is active to use CloudScraper.
For the first time I saw 403 in logs when CF is active. When I tested locally I got 503. I tried to use VPN in SF, as my ec2 is in the US, I still got 503. So I was not able to understand what's happening.
The website disabled CF already, so I will wait for the next time to understand what's happening. :)

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

No branches or pull requests

6 participants