docs: make Chinese README the default
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
## 🚀 **Looking for an even faster and simpler way to scrape at scale (only 5 lines of code)?** Check out our enhanced version at [**ScrapeGraphAI.com**](https://scrapegraphai.com/?utm_source=github&utm_medium=readme&utm_campaign=oss_cta&ut#m_content=top_banner)! 🚀
|
||||
<!-- WEHUB_ZH_README -->
|
||||
> [!NOTE]
|
||||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||||
> [English](./README.en.md) · [原始项目](https://github.com/ScrapeGraphAI/Scrapegraph-ai) · [上游 README](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/HEAD/README.md)
|
||||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||||
|
||||
## 🚀 **想要一种更快、更简单的规模化爬取方式(仅需 5 行代码)?** 请访问我们的增强版:[**ScrapeGraphAI.com**](https://scrapegraphai.com/?utm_source=github&utm_medium=readme&utm_campaign=oss_cta&ut#m_content=top_banner)! 🚀
|
||||
|
||||
---
|
||||
|
||||
# 🕷️ ScrapeGraphAI: You Only Scrape Once
|
||||
# 🕷️ ScrapeGraphAI:只需爬取一次
|
||||
|
||||
<p align="center">
|
||||
<a href="https://scrapegraphai.com">
|
||||
@@ -30,10 +36,10 @@
|
||||
|
||||
[ScrapeGraphAI](https://scrapegraphai.com) is a *web scraping* python library that uses LLM and direct graph logic to create scraping pipelines for websites and local documents (XML, HTML, JSON, Markdown, etc.).
|
||||
|
||||
Just say which information you want to extract and the library will do it for you!
|
||||
只需说明你想提取哪些信息,库会替你完成!
|
||||
|
||||
## 🚀 Integrations
|
||||
ScrapeGraphAI offers seamless integration with popular frameworks and tools to enhance your scraping capabilities. Whether you're building with Python or Node.js, using LLM frameworks, or working with no-code platforms, we've got you covered with our comprehensive integration options..
|
||||
## 🚀 集成
|
||||
ScrapeGraphAI 可与主流框架和工具无缝集成,增强你的爬取能力。无论你使用 Python 或 Node.js 开发、使用 LLM 框架,还是与无代码平台协作,我们都提供全面的集成选项..
|
||||
|
||||
<p align="center">
|
||||
<a href="https://scrapegraphai.com">
|
||||
@@ -41,9 +47,9 @@ ScrapeGraphAI offers seamless integration with popular frameworks and tools to e
|
||||
</a>
|
||||
</p>
|
||||
|
||||
You can find more informations at the following [link](https://scrapegraphai.com)
|
||||
更多信息请参阅以下[链接](https://scrapegraphai.com)
|
||||
|
||||
**Integrations**:
|
||||
**集成**:
|
||||
- **API**: [Documentation](https://docs.scrapegraphai.com/introduction)
|
||||
- **SDKs**: [Python](https://docs.scrapegraphai.com/sdks/python), [Node](https://docs.scrapegraphai.com/sdks/javascript)
|
||||
- **LLM Frameworks**: [Langchain](https://docs.scrapegraphai.com/integrations/langchain), [Llama Index](https://docs.scrapegraphai.com/integrations/llamaindex), [Crew.ai](https://docs.scrapegraphai.com/integrations/crewai), [Agno](https://docs.scrapegraphai.com/integrations/agno), [CamelAI](https://github.com/camel-ai/camel)
|
||||
@@ -51,9 +57,9 @@ You can find more informations at the following [link](https://scrapegraphai.com
|
||||
- **MCP server**: [Link](https://smithery.ai/server/@ScrapeGraphAI/scrapegraph-mcp)
|
||||
|
||||
|
||||
## 🚀 Quick install
|
||||
## 🚀 快速安装
|
||||
|
||||
The reference page for Scrapegraph-ai is available on the official page of PyPI: [pypi](https://pypi.org/project/scrapegraphai/).
|
||||
Scrapegraph-ai 的参考页面可在 PyPI 官方页面查看:[pypi](https://pypi.org/project/scrapegraphai/).
|
||||
|
||||
```bash
|
||||
pip install scrapegraphai
|
||||
@@ -62,13 +68,13 @@ pip install scrapegraphai
|
||||
playwright install
|
||||
```
|
||||
|
||||
**Note**: it is recommended to install the library in a virtual environment to avoid conflicts with other libraries 🐱
|
||||
**注意**:建议在虚拟环境中安装本库,以避免与其他库发生冲突 🐱
|
||||
|
||||
|
||||
## 💻 Usage
|
||||
There are multiple standard scraping pipelines that can be used to extract information from a website (or local file).
|
||||
## 💻 用法
|
||||
有多种标准爬取流水线可用于从网站(或本地文件)提取信息。
|
||||
|
||||
The most common one is the `SmartScraperGraph`, which extracts information from a single page given a user prompt and a source URL.
|
||||
最常用的是 `SmartScraperGraph`,它根据用户提示和源 URL 从单个页面提取信息。
|
||||
|
||||
|
||||
```python
|
||||
@@ -100,7 +106,7 @@ print(json.dumps(result, indent=4))
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> For OpenAI and other models you just need to change the llm config!
|
||||
> 对于 OpenAI 及其他模型,你只需修改 llm 配置!
|
||||
> ```python
|
||||
>graph_config = {
|
||||
> "llm": {
|
||||
@@ -113,7 +119,7 @@ print(json.dumps(result, indent=4))
|
||||
>```
|
||||
|
||||
|
||||
The output will be a dictionary like the following:
|
||||
输出将如下所示的字典:
|
||||
|
||||
```python
|
||||
{
|
||||
@@ -142,88 +148,89 @@ The output will be a dictionary like the following:
|
||||
}
|
||||
}
|
||||
```
|
||||
There are other pipelines that can be used to extract information from multiple pages, generate Python scripts, or even generate audio files.
|
||||
还有其他流水线可用于从多个页面提取信息、生成 Python 脚本,甚至生成音频文件。
|
||||
|
||||
| Pipeline Name | Description |
|
||||
| 流水线名称 | 说明 |
|
||||
|-------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| SmartScraperGraph | Single-page scraper that only needs a user prompt and an input source. |
|
||||
| SearchGraph | Multi-page scraper that extracts information from the top n search results of a search engine. |
|
||||
| SpeechGraph | Single-page scraper that extracts information from a website and generates an audio file. |
|
||||
| ScriptCreatorGraph | Single-page scraper that extracts information from a website and generates a Python script. |
|
||||
| SmartScraperMultiGraph | Multi-page scraper that extracts information from multiple pages given a single prompt and a list of sources. |
|
||||
| ScriptCreatorMultiGraph | Multi-page scraper that generates a Python script for extracting information from multiple pages and sources. |
|
||||
| SmartScraperGraph | 单页爬取器,仅需用户提示和输入源。 |
|
||||
| SearchGraph | 多页爬取器,从搜索引擎前 n 条搜索结果中提取信息。 |
|
||||
| SpeechGraph | 单页爬取器,从网站提取信息并生成音频文件。 |
|
||||
| ScriptCreatorGraph | 单页爬取器,从网站提取信息并生成 Python 脚本。 |
|
||||
| SmartScraperMultiGraph | 多页爬取器,根据单一提示和源列表从多个页面提取信息。 |
|
||||
| ScriptCreatorMultiGraph | 多页爬取器,生成用于从多个页面和源提取信息的 Python 脚本。 |
|
||||
|
||||
For each of these graphs there is the multi version. It allows to make calls of the LLM in parallel.
|
||||
这些图(graph)各自都有 multi 版本,可并行调用 LLM。
|
||||
|
||||
It is possible to use different LLM through APIs, such as **OpenAI**, **Groq**, **Azure**, **Gemini**, **MiniMax** and more, or local models using **Ollama**.
|
||||
可通过 API 使用不同的 LLM,例如 **OpenAI**、**Groq**、**Azure**、**Gemini**、**MiniMax** 等,也可通过 **Ollama** 使用本地模型。
|
||||
|
||||
Remember to have [Ollama](https://ollama.com/) installed and download the models using the **ollama pull** command, if you want to use local models.
|
||||
若要使用本地模型,请确保已安装 [Ollama](https://ollama.com/),并使用 **ollama pull** 命令下载模型。
|
||||
|
||||
|
||||
## 📖 Documentation
|
||||
## 📖 文档
|
||||
|
||||
[](https://colab.research.google.com/drive/1sEZBonBMGP44CtO6GQTwAlL0BGJXjtfd?usp=sharing)
|
||||
|
||||
The documentation for ScrapeGraphAI can be found [here](https://docs.scrapegraphai.com/introduction).
|
||||
## 🆚 Open Source vs Managed API
|
||||
ScrapeGraphAI 文档见[此处](https://docs.scrapegraphai.com/introduction).
|
||||
|
||||
ScrapeGraphAI comes in two flavours: **this open-source library**, which you run yourself, and the **managed cloud API** (used via the [Python](https://github.com/ScrapeGraphAI/scrapegraph-py) and [JS/TS](https://github.com/ScrapeGraphAI/scrapegraph-js) SDKs). This table explains the difference so you can pick the right one.
|
||||
## 🆚 开源版 vs 托管 API
|
||||
|
||||
| | Open Source (`scrapegraphai`) | Managed API (`scrapegraph-py` / `scrapegraph-js`) |
|
||||
ScrapeGraphAI 提供两种形态:**本开源库**由你自行部署运行,以及通过 [Python](https://github.com/ScrapeGraphAI/scrapegraph-py) 和 [JS/TS](https://github.com/ScrapeGraphAI/scrapegraph-js) SDK 调用的**托管云 API**。下表说明两者的差异,便于你选择合适方案。
|
||||
|
||||
| | 开源版 (`scrapegraphai`) | 托管 API (`scrapegraph-py` / `scrapegraph-js`) |
|
||||
|---|---|---|
|
||||
| **What it is** | A Python library you run yourself | A hosted cloud service you call via SDK |
|
||||
| **Where it runs** | Your own infrastructure (self-hosted) | ScrapeGraphAI cloud |
|
||||
| **LLM** | Bring your own (OpenAI, Groq, Gemini, Azure, local via Ollama) | Managed for you |
|
||||
| **Browser / JS rendering** | You configure it (Playwright) | Managed (stealth, `auto`/`fast`/`js` modes) |
|
||||
| **Proxies & anti-bot** | Your responsibility | Included |
|
||||
| **Scaling & maintenance** | Your responsibility | Fully managed |
|
||||
| **Cost model** | LLM tokens + your own infra | Pay-as-you-go credits |
|
||||
| **Auth** | Your own LLM keys | `SGAI_API_KEY` |
|
||||
| **Capabilities** | Graph pipelines (SmartScraper, Search, Speech, ScriptCreator…) | Scrape, Extract, Search, Crawl, Monitor, History |
|
||||
| **Setup effort** | More configuration | Minimal — API key + one call |
|
||||
| **License** | MIT | SDK is MIT; the API service is paid |
|
||||
| **它是什么** | 由你自行运行的 Python 库 | 通过 SDK 调用的托管云服务 |
|
||||
| **运行位置** | 你自己的基础设施(自托管) | ScrapeGraphAI 云端 |
|
||||
| **LLM** | 自带(OpenAI、Groq、Gemini、Azure,或通过 Ollama 本地运行) | 由平台托管 |
|
||||
| **浏览器 / JS 渲染** | 自行配置(Playwright) | 托管(隐身模式,`auto`/`fast`/`js` 模式) |
|
||||
| **代理与反爬** | 自行负责 | 已包含 |
|
||||
| **扩展与维护** | 自行负责 | 全托管 |
|
||||
| **成本模式** | LLM token + 自有基础设施 | 按用量付费积分 |
|
||||
| **认证** | 使用你自己的 LLM 密钥 | `SGAI_API_KEY` |
|
||||
| **能力** | 图流水线(SmartScraper、Search、Speech、ScriptCreator…) | Scrape、Extract、Search、Crawl、Monitor、History |
|
||||
| **搭建工作量** | 配置较多 | 最少——API 密钥 + 一次调用 |
|
||||
| **许可证** | MIT | SDK 为 MIT;API 服务为付费 |
|
||||
|
||||
**Choose the open-source library** if you want full control, on-prem/self-hosted data, local LLMs (Ollama), or fine-grained cost tuning — and you're happy to manage browsers, proxies and scaling yourself.
|
||||
**选择开源库**,若你需要完全控制、本地/自托管数据、本地 LLM(Ollama)或精细成本调优——并愿意自行管理浏览器、代理与扩展。
|
||||
|
||||
**Choose the managed API** if you want zero infrastructure, managed JS rendering & anti-bot, built-in **Crawl** and scheduled **Monitor** jobs, and the fastest path to production — billed per credit.
|
||||
**选择托管 API**,若你需要零基础设施、托管 JS 渲染与反爬、内置 **Crawl** 与定时 **Monitor** 任务,以及最快上线路径——按积分计费。
|
||||
|
||||
- Open-source library: https://github.com/ScrapeGraphAI/Scrapegraph-ai
|
||||
- Python SDK: https://github.com/ScrapeGraphAI/scrapegraph-py
|
||||
- JS/TS SDK: https://github.com/ScrapeGraphAI/scrapegraph-js
|
||||
- API docs: https://docs.scrapegraphai.com/introduction
|
||||
- 开源库:https://github.com/ScrapeGraphAI/Scrapegraph-ai
|
||||
- Python SDK:https://github.com/ScrapeGraphAI/scrapegraph-py
|
||||
- JS/TS SDK:https://github.com/ScrapeGraphAI/scrapegraph-js
|
||||
- API 文档:https://docs.scrapegraphai.com/introduction
|
||||
|
||||
## 🤝 Contributing
|
||||
## 🤝 参与贡献
|
||||
|
||||
Feel free to contribute and join our Discord server to discuss with us improvements and give us suggestions!
|
||||
欢迎贡献并加入我们的 Discord 服务器,与我们讨论改进并向我们提出建议!
|
||||
|
||||
Please see the [contributing guidelines](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
|
||||
请参阅[贡献指南](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/CONTRIBUTING.md).
|
||||
|
||||
[](https://discord.gg/uJN7TYcpNa)
|
||||
[](https://www.linkedin.com/company/scrapegraphai/)
|
||||
[](https://twitter.com/scrapegraphai)
|
||||
|
||||
## 🔗 ScrapeGraph API & SDKs
|
||||
If you are looking for a quick solution to integrate ScrapeGraph in your system, check out our powerful API [here!](https://scrapegraphai.com)
|
||||
## 🔗 ScrapeGraph API 与 SDK
|
||||
若你正在寻找将 ScrapeGraph 集成到系统中的快捷方案,请查看我们强大的 API [这里!](https://scrapegraphai.com)
|
||||
|
||||
[](https://scrapegraphai.com)
|
||||
|
||||
We offer SDKs in both Python and Node.js, making it easy to integrate into your projects. Check them out below:
|
||||
我们提供 Python 和 Node.js 两套 SDK,便于集成到你的项目中。请在下方查看:
|
||||
|
||||
| SDK | Language | GitHub Link |
|
||||
| SDK | 语言 | GitHub 链接 |
|
||||
|-----------|----------|-----------------------------------------------------------------------------|
|
||||
| Python SDK | Python | [scrapegraph-py](https://docs.scrapegraphai.com/sdks/python) |
|
||||
| Node.js SDK | Node.js | [scrapegraph-js](https://docs.scrapegraphai.com/sdks/javascript) |
|
||||
|
||||
The Official API Documentation can be found [here](https://docs.scrapegraphai.com/introduction).
|
||||
官方 API 文档可在此查看 [这里](https://docs.scrapegraphai.com/introduction).
|
||||
|
||||
## 📈 Telemetry
|
||||
We collect anonymous usage metrics to enhance our package's quality and user experience. The data helps us prioritize improvements and ensure compatibility. If you wish to opt-out, set the environment variable SCRAPEGRAPHAI_TELEMETRY_ENABLED=false. For more information, please refer to the documentation [here](https://docs.scrapegraphai.com/introduction).
|
||||
## 📈 遥测(Telemetry)
|
||||
我们收集匿名使用指标以提升软件包质量与用户体验。这些数据帮助我们优先改进并确保兼容性。若要退出,请设置环境变量 SCRAPEGRAPHAI_TELEMETRY_ENABLED=false。更多信息请参阅文档 [这里](https://docs.scrapegraphai.com/introduction).
|
||||
|
||||
## ❤️ Contributors
|
||||
## ❤️ 贡献者
|
||||
[](https://github.com/ScrapeGraphAI/Scrapegraph-ai/graphs/contributors)
|
||||
|
||||
## 🎓 Citations
|
||||
If you have used our library for research purposes please quote us with the following reference:
|
||||
## 🎓 引用
|
||||
若你在研究中使用了本库,请使用以下文献引用我们:
|
||||
```text
|
||||
@misc{scrapegraph-ai,
|
||||
author = {Lorenzo Padoan, Marco Vinciguerra},
|
||||
@@ -233,22 +240,22 @@ If you have used our library for research purposes please quote us with the foll
|
||||
note = {A Python library for scraping leveraging large language models}
|
||||
}
|
||||
```
|
||||
## Authors
|
||||
## 作者
|
||||
|
||||
| | Contact Info |
|
||||
| | 联系方式 |
|
||||
|--------------------|----------------------|
|
||||
| Marco Vinciguerra | [](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
|
||||
| Lorenzo Padoan | [](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |
|
||||
|
||||
## 📜 License
|
||||
## 📜 许可证
|
||||
|
||||
ScrapeGraphAI is licensed under the MIT License. See the [LICENSE](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/LICENSE) file for more information.
|
||||
ScrapeGraphAI 采用 MIT 许可证。更多信息请参阅 [LICENSE](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/LICENSE) 文件。
|
||||
|
||||
## Acknowledgements
|
||||
## 致谢
|
||||
|
||||
- We would like to thank all the contributors to the project and the open-source community for their support.
|
||||
- ScrapeGraphAI is meant to be used for data exploration and research purposes only. We are not responsible for any misuse of the library.
|
||||
- 感谢所有项目贡献者及开源社区的支持。
|
||||
- ScrapeGraphAI 仅用于数据探索与研究目的。我们不对库的滥用承担责任。
|
||||
|
||||
Made with ❤️ by [ScrapeGraph AI](https://scrapegraphai.com)
|
||||
由 [ScrapeGraph AI](https://scrapegraphai.com) 用 ❤️ 打造
|
||||
|
||||
[Scarf tracking](https://static.scarf.sh/a.png?x-pxid=102d4b8c-cd6a-4b9e-9a16-d6d141b9212d)
|
||||
|
||||
Reference in New Issue
Block a user