{"id":18098265,"url":"https://github.com/sayem314/hooman","last_synced_at":"2025-07-22T11:04:01.868Z","repository":{"id":40770841,"uuid":"261024002","full_name":"sayem314/hooman","owner":"sayem314","description":"http interceptor to hoomanize cloudflare requests","archived":false,"fork":false,"pushed_at":"2022-12-11T04:31:35.000Z","size":1091,"stargazers_count":148,"open_issues_count":27,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-20T13:09:22.930Z","etag":null,"topics":["2captcha","captcha","cloudflare","cloudflare-bypass","cloudscraper","ddos","got","hcaptcha","iaum","interceptor","nodejs","recaptcha","request","scraper","waf"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hooman","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sayem314.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T21:25:12.000Z","updated_at":"2025-05-17T12:18:01.000Z","dependencies_parsed_at":"2023-01-26T15:30:32.332Z","dependency_job_id":null,"html_url":"https://github.com/sayem314/hooman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sayem314/hooman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayem314%2Fhooman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayem314%2Fhooman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayem314%2Fhooman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayem314%2Fhooman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayem314","download_url":"https://codeload.github.com/sayem314/hooman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayem314%2Fhooman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266481732,"owners_count":23935938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2captcha","captcha","cloudflare","cloudflare-bypass","cloudscraper","ddos","got","hcaptcha","iaum","interceptor","nodejs","recaptcha","request","scraper","waf"],"created_at":"2024-10-31T20:09:14.661Z","updated_at":"2025-07-22T11:04:01.844Z","avatar_url":"https://github.com/sayem314.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## hooman ![JS-Challange](https://github.com/sayem314/hooman/workflows/JS-Challenge/badge.svg)\n\nHTTP interceptor using got to bypass Cloudflare DDOS protection / JavaScript challenge on Node.js\n\n|                           JS-Challange                            |                            hCaptcha                             |\n| :---------------------------------------------------------------: | :-------------------------------------------------------------: |\n| ![](https://github.com/sayem314/hooman/raw/master/screenshot.png) | ![](https://github.com/sayem314/hooman/raw/master/hCaptcha.png) |\n\n\u003e hooman is not meant for spamming, please use it sanely.\n\n## Install\n\n```shell\n# with npm: npm i hooman got\nyarn add hooman got\n```\n\n\u003e got is peer-dependency\n\n## Usage Example\n\n###### GET HTML\n\n```js\nconst hooman = require('hooman');\n\n(async () =\u003e {\n  try {\n    const response = await hooman.get('https://sayem.eu.org');\n    console.log(response.body);\n    //=\u003e '\u003c!doctype html\u003e ...'\n  } catch (error) {\n    console.log(error.response.body);\n    //=\u003e 'Internal server error ...'\n  }\n})();\n```\n\n###### POST JSON\n\n```js\nconst { body } = await hooman.post('https://httpbin.org/anything', {\n  json: {\n    hello: 'world',\n  },\n  responseType: 'json',\n});\nconsole.log(body.data);\n//=\u003e {hello: 'world'}\n```\n\n###### Pipe Stream\n\n```js\n// This is mandatory to set cookie first since .stream() doesn't fire hooks\nawait hooman(jsChallengePage);\n\n// Now we can download files\nconst image = fs.createWriteStream('image.jpg');\nhooman.stream(imageUrl).pipe(image);\n```\n\n###### Captcha\n\n```js\nconst response = await hooman.get(url, {\n  captchaKey: '2captcha_or_rucaptcha_api_key',\n  rucaptcha: true | false, // optional (default false)\n});\nconsole.log(response.body);\n```\n\nYou can also set environment variable `HOOMAN_CAPTCHA_KEY` and `HOOMAN_RUCAPTCHA`\n\n\u003e All you need to do is provide `captchaKey` and rest is done by hooman. It automatically detects if g/hCaptcha is present and need solving or can be solved. There are console.log print on hit as well.\n\n\u003e Note that if you make multiple request to same site at once only the first request will be sent for captcha solving while other request will be hanged until captcha is solved. You might face multiple trigger to captcha, please monitor your usage. Best practice is to make a dummy request first and let hooman solve captcha and then process further requests.\n\n###### Custom Captcha Handling\n\n```js\nconst response = await hooman.get(url, {\n  // required\n  captchaKey: 'your_captcha_api_key',\n  // use with captchaKey, should return captcha response string or undefined\n  onCaptcha: ({ key, pageurl, sitekey, method }) =\u003e {\n    // solve captcha here\n    return h_captcha_response;\n  },\n});\nconsole.log(response.body);\n```\n\n###### Proxy\n\n```js\nconst HttpsProxyAgent = require('https-proxy-agent');\n\nconst proxy = new HttpsProxyAgent('http://127.0.0.1:3128');\n\nconst response = await hooman('https://sayem.eu.org', {\n  agent: {\n    https: proxy,\n  },\n});\n```\n\n#### API\n\nPlease see available [API here](https://github.com/sindresorhus/got/blob/master/readme.md#api).\n\n\u003e All methods and props of [got](https://github.com/sindresorhus/got) should work fine.\n\n## Support\n\nIf you open any issue, please respect issue template and provide clean and re-producible example code which can be run without any modification. Low effort issue will be ignored.\n\n---\n\nI don't make any profit with this library. If you want to show your appreciation, you can donate me [here](https://sayem.eu.org/donate) :scream_cat: Thanks! You can also hire me for scraping solution, ping me and we will discuss further :smile:\n\n\u003e Made with :heart: \u0026 :coffee: by Sayem\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayem314%2Fhooman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayem314%2Fhooman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayem314%2Fhooman/lists"}