You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey mate, this is related to #12 - I followed your advice and wanted to add https://github.com/JimmyLaurent/hcaptcha-solver as a captcha solver. The node lib actually works with the site I tried and returns a token but I have difficulties adding it as a solver under ./captcha.
First problem, routes.ts tries to pass hostname and sitekey to the solver, but hcaptcha-solver needs just a url:
Second problem, page waits for this element and code fails with timeout if not found: await page.waitForSelector('#challenge-form [type=submit]')
So I commented these out just for testing and the returned token works and I get a successful response from the site 👍
But I am really not good at typescript, so would not even know where to grab the url from in the function I export from my solver. Also no idea how to import the module correctly. But here is what I have as ./captcha/hcaptcha.ts
const solveHCaptcha = require('hcaptcha-solver');
export default async function solve(): Promise<string> {
try {
const response = await solveHCaptcha(url);
return response
// F0_eyJ0eXAiOiJKV1Q...
} catch (error) {
console.log(error);
}
}
Maybe you can help adding this one like the harvester? Or maybe it would make more sense to integrate it in the main code and try to solve hcaptchas with it before calling the solver services.
Thanks!
The text was updated successfully, but these errors were encountered:
Second problem, page waits for this element and code fails with timeout if not found:
await page.waitForSelector('#challenge-form [type=submit]')
Which site does this line fail on?
I pass all those arguments because they might be needed, but it might be a good idea to pass the whole URL since you can take a hostname from a full URL but not vice versa. Regardless, since the hCaptcha solver takes only the hostname from the url you should be able to pass the domain.
Hey mate, this is related to #12 - I followed your advice and wanted to add https://github.com/JimmyLaurent/hcaptcha-solver as a captcha solver. The node lib actually works with the site I tried and returns a token but I have difficulties adding it as a solver under ./captcha.
First problem, routes.ts tries to pass hostname and sitekey to the solver, but hcaptcha-solver needs just a url:
Second problem, page waits for this element and code fails with timeout if not found:
await page.waitForSelector('#challenge-form [type=submit]')
So I commented these out just for testing and the returned token works and I get a successful response from the site 👍
But I am really not good at typescript, so would not even know where to grab the url from in the function I export from my solver. Also no idea how to import the module correctly. But here is what I have as ./captcha/hcaptcha.ts
The text was updated successfully, but these errors were encountered: