AI资讯大全AIPPXP.CN搜索 ↗
手把手教程 · 图文步骤

Graphic tutorial: Five steps to self-host Camofox so that your agent can capture data no longer blocked by Cloudflare图文教程:五步自托管 Camofox,让你的智能体抓数据不再被 Cloudflare 拦下

We will guide you step by step to start running Camofox Browser locally or on your own server: from downloading and decompressing, starting the service, to using the search macro to capture the first piece of data, and connecting to the ready-made Puppeteer/Playwright script, there is no need to write a single line of anti-crawling code.

手把手带你在本地或自己的服务器上跑起 Camofox Browser:从下载解压、启动服务,到用搜索宏抓第一条数据、接进现成的 Puppeteer/Playwright 脚本,全程不需要写一行反爬代码。

2026-10-05 更新 · 免费
图文教程:五步自托管 Camofox,让你的智能体抓数据不再被 Cloudflare 拦下
1

Step 1: Download and unzip the source code package第一步:下载并解压源码包

Go to the "AI Tools" section of this site to download the Camofox Browser source code package (camofox-browser-master.zip, about 2 MB), and unzip it to any directory.

Confirm that Docker (recommended) or Python 3.10+ is installed on the machine; for domestic environments, it is recommended to configure image acceleration in advance.

中文

到本站「AI工具」栏目下载 Camofox Browser 源码包(camofox-browser-master.zip,约 2 MB),解压到任意目录。

确认机器上已装 Docker(推荐)或 Python 3.10+;国内环境建议提前配好镜像加速。

第一步:下载并解压源码包
2

Step 2: Start the service with one click第二步:一键启动服务

Docker method: Execute docker build -t camofox . && docker run -p 9377:9377 camofox in the decompression directory. The first build will pull the Camoufox base image, which will take a few minutes.

Pure Python method: pip install -r requirements.txt and then press README to start the service. When you see listening on :9377, it is successful.

中文

Docker 方式:在解压目录执行 docker build -t camofox . && docker run -p 9377:9377 camofox,首次构建会拉取 Camoufox 基础镜像,需要几分钟。

纯 Python 方式:pip install -r requirements.txt 后按 README 启动服务,看到 listening on :9377 即成功。

3

Step 3: Use search macro to capture the first piece of data第三步:用搜索宏抓第一条数据

Use curl to send a POST request to http://localhost:9377 and try the built-in macros: @google_search to capture search results, @reddit_subreddit to capture hot posts, and @youtube_search to capture video lists.

Want to draw YouTube subtitles? POST /youtube/transcript just pass the video link and language parameters, and the returned plain text will be cleaned.

中文

用 curl 向 http://localhost:9377 发 POST 请求试试内置宏:@google_search 抓搜索结果、@reddit_subreddit 抓版面热帖、@youtube_search 抓视频列表。

想抽 YouTube 字幕?POST /youtube/transcript 传视频链接和语言参数即可,返回的是清洗好的纯文本。

4

Step 4: Connect to your existing agent第四步:接进你现有的智能体

Puppeteer / Playwright users only need to change the browser endpoint to http://localhost:9377, and the original crawling script will immediately gain invisibility, with no other code changes.

For terminal agent users such as Claude Code/OpenClaw, just write the interface address into the MCP or tool configuration and let the agent call it by itself.

中文

Puppeteer / Playwright 用户只需把浏览器 endpoint 改成 http://localhost:9377,原有抓取脚本立刻获得隐身能力,其他代码零改动。

Claude Code / OpenClaw 等终端智能体用户,把接口地址写进 MCP 或工具配置,让智能体自己调用即可。

5

Step 5: Long-term use recommendations第五步:长期使用建议

Equipped with a proxy pool to rotate the export IP to avoid high-frequency access to the same address; add a scheduled restart to the service to make the browser context cleaner.

Emphasize compliance again: only crawl the data that is allowed to be crawled, and comply with the robots agreement and terms of service of the target site.

中文

配上代理池轮换出口 IP,避免同一地址高频访问;给服务加个定时重启,浏览器上下文更干净。

再次强调合规:只抓允许抓的数据,遵守目标站 robots 协议与服务条款。

第五步:长期使用建议

Use reminder使用提醒

The supporting resource for this tutorial is the Camofox Browser master source code package, see the "AI Tools" column. Please use the tool for legal and compliance scenarios. This article is compiled from public information, and the resources are only for learning and exchange.

中文

本教程配套资源为 Camofox Browser master 源码包,见「AI工具」栏目。请将工具用于合法合规场景,本文整理自公开资料,资源仅供学习交流。

资源下载 · Download

本篇为图文教程,直接按步骤操作即可,无需下载文件。

0阅读0 条评论

阅读与点赞数据保存在你的浏览器本地,欢迎留下你的想法。

评论 文明发言,让讨论更有价值

正能量公益广告今日正能量学一点,用一点;今天种下的种子,会长成明天的能力。去免费下载专区 →广告