sayem314 / hooman

http interceptor to hoomanize cloudflare requests
https://www.npmjs.com/package/hooman
MIT License
148 stars 18 forks source link

Am I doing something wrong? #27

Closed Tienza closed 4 years ago

Tienza commented 4 years ago

What would you like to discuss?

Nothing is being printed when I invoke this code.

node: v10.14.0 hooman: v1.2.5 OS: Windows 10

const hooman = require('hooman');

(async () => {
    try {
        const response = await hooman.get('https://kissmanga.com/Manga/Grand-Blue');
        console.log(response.body);
        console.log('I succeed');
        //=> '<!doctype html> ...'
    } catch (error) {
        console.log(error.response.body);
        console.log('I failed');
        //=> 'Internal server error ...'
    }
})();

Checklist

sayem314 commented 4 years ago

image

works fine.

Tienza commented 4 years ago

Thanks for the quick reply!

image

Any idea why this might be happening on my end?

sayem314 commented 4 years ago

Not sure. You must be doing something wrong on your final code, please recheck the code.

Tienza commented 4 years ago

The posted code is all I have, nothing has changed. image

sayem314 commented 4 years ago

why you are using nodejs? shouldn't it be node?

Tienza commented 4 years ago

Oh, I must have pressed tab too make times for autocomplete. That was the issue. Thank you so much!

Tienza commented 4 years ago

I'm getting "No captcha answer" response when trying the code on a slightly different link. I cannot get the captcha key from browser because when I use the browser there is no captcha request.

image image

const hooman = require('hooman');

(async () => {
    try {
        const response = await hooman.get('https://kissmanga.com/Manga/Grand-Blue/Chapter-060--Chestnut-Picking?id=599383');
        console.log(response.body);
        //=> '<!doctype html> ...'
    } catch (error) {
        console.log(error.response.body);
        //=> 'Internal server error ...'
    }
})();
sayem314 commented 4 years ago

The site is using custom captcha. You need to build your own solver for that. Nothing to do with hooman.

image

Tienza commented 4 years ago

Thank you for the help :)