Crawlee 网页爬取与数据抓取 SDK
Crawlee 是 Apify 面向 Node.js 的开源网页爬取和数据抓取库。它结合了请求队列、浏览器自动化、代理支持和存储原语,使开发者能够使用一个工具包构建可靠的 Playwright、Puppeteer、Cheerio 或 HTTP 爬虫。
先决条件
node.js, npm, bun, python, docker, java
安装
使用与您的环境匹配的上游安装或设置路径:
- npx crawlee create my-crawler
- npm start
- npm install crawlee playwright
- npm install crawlee@next
上游的要求和注意事项:
- 更喜欢使用 🐍 Python 而不是 JavaScript?👉 查看 Crawlee for Python 👈。
- Crawlee 需要 Node.js 16 或更高版本。
基本用法或入门说明:
-
我们建议访问 Crawlee 文档中的 Introduction tutorial 获取更多信息。
-
使用 Crawlee CLI
-
尝试 Crawlee 最快的方法是使用 Crawlee CLI 并选择 Getting started example。CLI 会为您安装所有必要的依赖并添加样板代码供您使用。
-
Source: https://github.com/1991513ccie-png/skills
-
Extracted from upstream docs: https://raw.githubusercontent.com/apify/crawlee/HEAD/README.md
文档
- https://crawlee.dev/js/docs/guides/configuration
Scan to join WeChat group