Its solving but giving empty response and i changed the mode to source still its not giving me cookies
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:password@hostname.com: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
Description
Hey,
Its solving but giving empty response and i changed the mode to source still its not giving me cookies
im using this:
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