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

Empty Response Problem!! #58

Open
parvinders347 opened this issue Feb 11, 2025 · 0 comments
Open

Empty Response Problem!! #58

parvinders347 opened this issue Feb 11, 2025 · 0 comments

Comments

@parvinders347
Copy link

parvinders347 commented Feb 11, 2025

Description

Hey,

Its solving but giving empty response and i changed the mode to source still its not giving me cookies

im using this:

const initCycleTLS = require('cycletls');
async function test() {
    const session = await fetch('http://localhost:3000/cf-clearance-scraper', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            url: 'https://2captcha.com/demo/cloudflare-turnstile-challenge',
            mode: "waf-session",
            // proxy:{
            //     host: '127.0.0.1',
            //     port: 3000,
            //     username: 'username',
            //     password: 'password'
            // }
        })
    }).then(res => res.json()).catch(err => { console.error(err); return null });

    if (!session || session.code != 200) return console.error(session);

    const cycleTLS = await initCycleTLS();
    const response = await cycleTLS('https://2captcha.com/demo/cloudflare-turnstile-challenge', {
        body: '',
        ja3: '772,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,23-27-65037-43-51-45-16-11-13-17513-5-18-65281-0-10-35,25497-29-23-24,0', // https://scrapfly.io/web-scraping-tools/ja3-fingerprint
        userAgent: session.headers["user-agent"],
        // proxy: 'http://username:[email protected]:443',
        headers: {
            ...session.headers,
            cookie: session.cookies.map(cookie => `${cookie.name}=${cookie.value}`).join('; ')
        }
    }, 'get');

    console.log(response.status);
    cycleTLS.exit().catch(err => { });
}
test()

its opening site and solving but just print 200 in terminal not giving any cookies and html

Full steps to reproduce the issue

npm run start

node test.js

opening browser and solving

print 200 response code not giving cookies or html

Issue Type

Bug

Operating System

Windows 10

Do you use Docker?

I don't use Docker

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

1 participant