
AI 기반 Python 스크레이퍼
## 🚀 **더 빠르고 간단하게 대규모 스크래핑을 할 방법을 찾고 계신가요? (단 5줄의 코드만으로!)** 그렇다면 향상된 버전을 [**ScrapeGraphAI.com**](https://scrapegraphai.com/?utm_source=github&utm_medium=readme&utm_campaign=oss_cta&ut#m_content=top_banner)에서 확인해보세요! 🚀
---
# 🕷️ ScrapeGraphAI: 한 번만 스크래핑하세요
<p align="center">
<a href="https://scrapegraphai.com">
<img src="https://assets.kitploit.com/production/public/readmes/41478/e11a555115b80e07241afdb0aec04ee9fae66f983d969d27fbd8a64a21f090de.png" alt="ScrapeGraphAI" style="width: 100%;">
</a>
</p>
[English](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/README.md) | [中文](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/chinese.md) | [日本語](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/japanese.md)
| [한국어](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/korean.md)
| [Русский](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/russian.md) | [Türkçe](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/turkish.md)
| [Deutsch](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/german.md)
| [Español](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/spanish.md)
| [français](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/french.md)
| [Português](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/portuguese.md)
| [Italiano](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/italian.md)
[](https://pepy.tech/projects/scrapegraphai)
[](https://opensource.org/licenses/MIT)
[](https://discord.gg/gkxQDAjfeX)
<p align="center">
<a href="https://trendshift.io/repositories/15078" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15078" alt="ScrapeGraphAI%2FScrapegraph-ai | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
<p align="center">
[ScrapeGraphAI](https://scrapegraphai.com)는 LLM과 직접 그래프 로직을 사용하여 웹사이트 및 로컬 문서(XML, HTML, JSON, Markdown 등)에 대한 스크래핑 파이프라인을 생성하는 *웹 스크래핑* Python 라이브러리입니다.
추출하려는 정보를 말하기만 하면 라이브러리가 알아서 해줍니다!
## 🚀 통합
ScrapeGraphAI는 인기 있는 프레임워크 및 도구와의 원활한 통합을 제공하여 스크래핑 기능을 향상시킵니다. Python 또는 Node.js로 구축하든, LLM 프레임워크를 사용하든, 노코드 플랫폼에서 작업하든, 포괄적인 통합 옵션으로 모든 것을 지원합니다..
<p align="center">
<a href="https://scrapegraphai.com">
<img src="https://assets.kitploit.com/production/public/readmes/41478/0e788431fde2dc01cf2aa4b53d87b9befe3c728b719a5a45dec11ffb4d7c77a5.png" alt="Web data extraction at scale? Try ScrapeGraphAI cloud" style="width: 100%;">
</a>
</p>
다음 [링크](https://scrapegraphai.com)에서 더 많은 정보를 찾을 수 있습니다.
**통합**:
- **API**: [문서](https://docs.scrapegraphai.com/introduction)
- **SDK**: [Python](https://docs.scrapegraphai.com/sdks/python), [Node](https://docs.scrapegraphai.com/sdks/javascript)
- **LLM 프레임워크**: [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)
- **로우코드 프레임워크**: [Pipedream](https://pipedream.com/apps/scrapegraphai), [Bubble](https://bubble.io/plugin/scrapegraphai-1745408893195x213542371433906180), [Zapier](https://zapier.com/apps/scrapegraphai/integrations), [n8n](http://localhost:5001/dashboard), [Dify](https://dify.ai), [Toolhouse](https://app.toolhouse.ai/mcp-servers/scrapegraph_smartscraper)
- **MCP 서버**: [링크](https://smithery.ai/server/@ScrapeGraphAI/scrapegraph-mcp)
## 🚀 빠른 설치
Scrapegraph-ai의 참조 페이지는 PyPI 공식 페이지에서 확인할 수 있습니다: [pypi](https://pypi.org/project/scrapegraphai/).
```bash
pip install scrapegraphai
# IMPORTANT (for fetching websites content)
playwright install
```
**참고**: 다른 라이브러리와의 충돌을 방지하기 위해 가상 환경에 라이브러리를 설치하는 것이 좋습니다 🐱
## 💻 사용법
웹사이트(또는 로컬 파일)에서 정보를 추출하는 데 사용할 수 있는 여러 표준 스크래핑 파이프라인이 있습니다.
가장 일반적인 것은 `SmartScraperGraph`로, 사용자 프롬프트와 소스 URL을 기반으로 단일 페이지에서 정보를 추출합니다.
```python
from scrapegraphai.graphs import SmartScraperGraph
# Define the configuration for the scraping pipeline
graph_config = {
"llm": {
"model": "ollama/llama3.2",
"model_tokens": 8192,
"format": "json",
},
"verbose": True,
"headless": False,
}
# Create the SmartScraperGraph instance
smart_scraper_graph = SmartScraperGraph(
prompt="Extract useful information from the webpage, including a description of what the company does, founders and social media links",
source="https://scrapegraphai.com/",
config=graph_config
)
# Run the pipeline
result = smart_scraper_graph.run()
import json
print(json.dumps(result, indent=4))
```
> [!NOTE]
> OpenAI 및 기타 모델의 경우 llm 설정만 변경하면 됩니다!
> ```python
>graph_config = {
> "llm": {
> "api_key": "YOUR_OPENAI_API_KEY",
> "model": "openai/gpt-4o-mini",
> },
> "verbose": True,
> "headless": False,
>}
>```
출력은 다음과 같은 딕셔너리 형태가 됩니다:
```python
{
"description": "ScrapeGraphAI transforms websites into clean, organized data for AI agents and data analytics. It offers an AI-powered API for effortless and cost-effective data extraction.",
"founders": [
{
"name": "",
"role": "Founder & Technical Lead",
"linkedin": "https://www.linkedin.com/in/perinim/"
},
{
"name": "Marco Vinciguerra",
"role": "Founder & Software Engineer",
"linkedin": "https://www.linkedin.com/in/marco-vinciguerra-7ba365242/"
},
{
"name": "Lorenzo Padoan",
"role": "Founder & Product Engineer",
"linkedin": "https://www.linkedin.com/in/lorenzo-padoan-4521a2154/"
}
],
"social_media_links": {
"linkedin": "https://www.linkedin.com/company/101881123",
"twitter": "https://x.com/scrapegraphai",
"github": "https://github.com/ScrapeGraphAI/Scrapegraph-ai"
}
}
```
여러 페이지에서 정보를 추출하거나, Python 스크립트를 생성하거나, 오디오 파일을 생성하는 데 사용할 수 있는 다른 파이프라인도 있습니다.
| 파이프라인 이름 | 설명 |
|-------------------------|------------------------------------------------------------------------------------------------------------------|
| SmartScraperGraph | 사용자 프롬프트와 입력 소스만 필요한 단일 페이지 스크래퍼. |
| SearchGraph | 검색 엔진의 상위 n개 검색 결과에서 정보를 추출하는 다중 페이지 스크래퍼. |
| SpeechGraph | 웹사이트에서 정보를 추출하고 오디오 파일을 생성하는 단일 페이지 스크래퍼. |
| ScriptCreatorGraph | 웹사이트에서 정보를 추출하고 Python 스크립트를 생성하는 단일 페이지 스크래퍼. |
| SmartScraperMultiGraph | 단일 프롬프트와 소스 목록을 기반으로 여러 페이지에서 정보를 추출하는 다중 페이지 스크래퍼. |
| ScriptCreatorMultiGraph | 여러 페이지와 소스에서 정보를 추출하는 Python 스크립트를 생성하는 다중 페이지 스크래퍼. |
이러한 각 그래프에는 멀티 버전이 있습니다. 이를 통해 LLM 호출을 병렬로 수행할 수 있습니다.
**OpenAI**, **Groq**, **Azure**, **Gemini**, **[MiniMax](https://github.com/scrapegraphai/scrapegraph-ai/blob/main/docs/minimax.md)** 등과 같은 API를 통해 다양한 LLM을 사용하거나 **Ollama**를 사용하여 로컬 모델을 사용할 수 있습니다.
로컬 모델을 사용하려면 [Ollama](https://ollama.com/)를 설치하고 **ollama pull** 명령어로 모델을 다운로드해야 합니다.
## 📖 문서
[](https://colab.research.google.com/drive/1sEZBonBMGP44CtO6GQTwAlL0BGJXjtfd?usp=sharing)
ScrapeGraphAI 문서는 [여기](https://docs.scrapegraphai.com/introduction)에서 확인할 수 있습니다.
## 🆚 오픈 소스 vs 관리형 API
ScrapeGraphAI는 두 가지 형태로 제공됩니다: 직접 실행하는 **오픈 소스 라이브러리**와 ([Python](https://github.com/ScrapeGraphAI/scrapegraph-py) 및 [JS/TS](https://github.com/ScrapeGraphAI/scrapegraph-js) SDK를 통해 사용하는) **관리형 클라우드 API**입니다. 아래 표는 차이점을 설명하여 적합한 것을 선택할 수 있도록 합니다.
| | 오픈 소스 (`scrapegraphai`) | 관리형 API (`scrapegraph-py` / `scrapegraph-js`) |
|---|---|---|
| **정의** | 직접 실행하는 Python 라이브러리 | SDK를 통해 호출하는 호스팅된 클라우드 서비스 |
| **실행 위치** | 자체 인프라(셀프 호스팅) | ScrapeGraphAI 클라우드 |
| **LLM** | 직접 가져오기(OpenAI, Groq, Gemini, Azure, Ollama를 통한 로컬) | 관리형 제공 |
| **브라우저/JS 렌더링** | 직접 구성(Playwright) | 관리형(스텔스, `auto`/`fast`/`js` 모드) |
| **프록시 및 안티봇** | 사용자 책임 | 포함 |
| **확장 및 유지보수** | 사용자 책임 | 완전 관리형 |
| **비용 모델** | LLM 토큰 + 자체 인프라 | 사용량 기반 크레딧 |
| **인증** | 자체 LLM 키 | `SGAI_API_KEY` |
| **기능** | 그래프 파이프라인(SmartScraper, Search, Speech, ScriptCreator 등) | 스크래핑, 추출, 검색, 크롤링, 모니터링, 기록 |
| **설정 노력** | 더 많은 구성 | 최소 — API 키 + 한 번의 호출 |
| **라이선스** | MIT | SDK는 MIT; API 서비스는 유료 |
**오픈 소스 라이브러리**를 선택하세요: 완전한 제어, 온프레미스/셀프 호스팅 데이터, 로컬 LLM(Ollama), 세분화된 비용 조정이 필요하고 브라우저, 프록시 및 확장을 직접 관리해도 괜찮다면.
**관리형 API**를 선택하세요: 인프라가 전혀 필요 없고, 관리형 JS 렌더링 및 안티봇, 내장 **크롤링** 및 예약된 **모니터** 작업, 프로덕션으로의 가장 빠른 경로를 원한다면 — 크레딧당 청구됩니다.
- 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
## 🤝 기여
자유롭게 기여하고 Discord 서버에 가입하여 개선 사항에 대해 논의하고 제안을 해주세요!
[기여 가이드라인](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 및 SDK
시스템에 ScrapeGraph를 빠르게 통합할 수 있는 솔루션을 찾고 있다면, 여기에서 강력한 API를 확인하세요! [여기!](https://scrapegraphai.com)
[](https://scrapegraphai.com)
Python 및 Node.js용 SDK를 모두 제공하여 프로젝트에 쉽게 통합할 수 있습니다. 아래에서 확인하세요:
| 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) |
공식 API 문서는 [여기](https://docs.scrapegraphai.com/introduction)에서 확인할 수 있습니다.
## 📈 원격 측정
저희는 패키지의 품질과 사용자 경험을 향상시키기 위해 익명 사용 통계를 수집합니다. 이 데이터는 개선 사항의 우선순위를 정하고 호환성을 보장하는 데 도움이 됩니다. 옵트아웃하려면 환경 변수 SCRAPEGRAPHAI_TELEMETRY_ENABLED=false를 설정하세요. 자세한 내용은 [여기](https://docs.scrapegraphai.com/introduction) 문서를 참조하세요.
## ❤️ 기여자
[](https://github.com/ScrapeGraphAI/Scrapegraph-ai/graphs/contributors)
## 🎓 인용
연구 목적으로 라이브러리를 사용하셨다면 다음 참조를 인용해 주세요:
```text
@misc{scrapegraph-ai,
author = {Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/ScrapeGraphAI/Scrapegraph-ai},
note = {A Python library for scraping leveraging large language models}
}
```
## 저자
| | 연락처 정보 |
|--------------------|----------------------|
| Marco Vinciguerra | [](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Lorenzo Padoan | [](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |
## 📜 라이선스
ScrapeGraphAI는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 [LICENSE](https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/LICENSE) 파일을 참조하세요.
## 감사의 말
프로젝트에 기여한 모든 기여자와 오픈 소스 커뮤니티의 지원에 감사드립니다.
ScrapeGraphAI는 데이터 탐색 및 연구 목적으로만 사용해야 합니다. 라이브러리의 오용에 대해 책임을 지지 않습니다.
❤️를 담아 [ScrapeGraph AI](https://scrapegraphai.com) 제작
[Scarf tracking](https://static.scarf.sh/a.png?x-pxid=102d4b8c-cd6a-4b9e-9a16-d6d141b9212d)