{"id":13725015,"url":"https://github.com/JimmyLaurent/cloudflare-scraper","last_synced_at":"2025-05-07T19:32:27.302Z","repository":{"id":40237595,"uuid":"270017072","full_name":"JimmyLaurent/cloudflare-scraper","owner":"JimmyLaurent","description":"A package to bypass Cloudflare's protection","archived":false,"fork":false,"pushed_at":"2023-02-11T00:35:48.000Z","size":83,"stargazers_count":287,"open_issues_count":27,"forks_count":30,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-07T19:08:12.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/JimmyLaurent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-06-06T15:09:44.000Z","updated_at":"2024-10-24T09:07:30.000Z","dependencies_parsed_at":"2023-02-18T19:45:52.353Z","dependency_job_id":null,"html_url":"https://github.com/JimmyLaurent/cloudflare-scraper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyLaurent%2Fcloudflare-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyLaurent%2Fcloudflare-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyLaurent%2Fcloudflare-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JimmyLaurent%2Fcloudflare-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JimmyLaurent","download_url":"https://codeload.github.com/JimmyLaurent/cloudflare-scraper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224645169,"owners_count":17346090,"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","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":[],"created_at":"2024-08-03T01:02:09.863Z","updated_at":"2024-11-14T15:30:36.848Z","avatar_url":"https://github.com/JimmyLaurent.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# cloudflare-scraper\n\nChrome is used to retrieve cloudflare cookies then **got** is used to perform requests making this solution reliable but also pretty fast.\n\n\u003e Version 2 is a complete rewrite: \n\u003e - it doesn't use puppeteer but vanilla chromium,\n\u003e - **request** package was replaced by **got** ,\n\u003e - headless support only works on **linux** out of the box but should be doable on windows or mac os with the help of docker or wsl.\n\u003e - extra features were removed (captcha bypass, etc..)\n\n## Install\n\n```bash\nnpm install cloudflare-scraper\n```\n\nMake sure you alse have **xfvb** linux package installed\n\n```bash\n# for ubuntu users\nsudo apt-get install xvfb\n``` \n\n## Quick Example\n\n```js\nimport got from 'cloudflare-scraper';\n\n(async () =\u003e {\n  try {\n    const response = await got.get('https://nowsecure.nl');\n    console.log(response.body);\n  } catch (error) {\n    console.log(error);\n  }\n})();\n```\n\n## API\n\nCheck **got** [documenatation](https://github.com/sindresorhus/got#documentation)\n\n## Env variables\n\n### NODE_CHROMIUM_SKIP_INSTALL (boolean)\n\nBy default, chromium is downloaded but on `npm install` command but you can skip the installation by enabling this variable.\n\n```bash\nexport NODE_CHROMIUM_SKIP_INSTALL=true\n```\n\n### CHROME_EXECUTABLE_PATH (string)\n\nSpecify a chrome executable\n\n```bash\nexport CHROME_EXECUTABLE_PATH=/path/to/chrome\n```\n\n### CF_SCRAPER_HEADLESS (boolean)\n\nEnable/disable headless mode (enabled by default)\n\nNote: headless mode uses \"xfvb\" and is only available on linux\n\n```bash\nexport CF_SCRAPER_HEADLESS=false\n```\n\n## TODO:\n\n- add proxy support\n- docker example","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimmyLaurent%2Fcloudflare-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJimmyLaurent%2Fcloudflare-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJimmyLaurent%2Fcloudflare-scraper/lists"}