sayem314 / hooman

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

[Help] Improve to Hooman #14

Closed Danny1994d closed 4 years ago

Danny1994d commented 4 years ago

What would you like to discuss?

Need help to improve my code to bypass uam, if is posible have tried like

hooman.get({ url: url, agent: { https: proxy, }, cloudflareRetry: 5, }) .catch((error) => { console.log(response.body);

but i get error This is my code

//fixed added captcha and removing proxy (with proxy just get captcha error)

Checklist

sayem314 commented 4 years ago

What error do you get? Site URL?

const hooman = require("hooman");
const HttpsProxyAgent = require("https-proxy-agent");

class Request {
  constructor() {}
  http(method, url, proxy) {
    hooman({
      method: method,
      url: url,
      headers: {
        // headers ...
        accept:
          "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "accept-encoding": "gzip, deflate, br",
        "accept-language":
          "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,uk;q=0.6,la;q=0.5",
        "cache-control": "no-cache",
        pragma: "no-cache",
        referer: url,
        "upgrade-insecure-requests": 1
      },
      agent: {
        https: new HttpsProxyAgent("http://" + proxy)
      }
    })
      .then(response => {
        console.log(response.body);
      })
      .catch(err => {
        console.log(err.message);
      });
  }
}
Danny1994d commented 4 years ago

added captcha and now work on uam

sayem314 commented 4 years ago

The site worked for me. They throw captcha so you need to provide your captchaKey.

EloB commented 4 years ago

@sayem314 How do you know what is your captcha key?

Edit: Now I understand it's 2captcha api key... Isn't super clear in the documentation. You should add a link in the documenation to both 2captcha and rucapcha... :)

Great library! <3