개요
Crawl4AI는 오픈 소스 웹 크롤러로, LLM을 위해 깨끗하고 구조화된 Markdown을 생성합니다. 비동기 크롤링, 캐싱, 안티 크롤러 탐지 및 적응형 지능을 갖추고 있으며, API 키 없이 배포할 수 있습니다.
README 미리보기
# 🚀🤖 Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper.\n\n\n\n\n\n[](https://github.com/unclecode/crawl4ai/stargazers)\n[](https://github.com/unclecode/crawl4ai/network/members)\n\n[](https://badge.fury.io/py/crawl4ai)\n[](https://pypi.org/project/crawl4ai/)\n[](https://pepy.tech/project/crawl4ai)\n[](https://github.com/sponsors/unclecode)\n\n---\n#### 🚀 Crawl4AI Cloud API — Closed Beta (Launching Soon)\nReliable, large-scale web extraction, now built to be _**drastically more cost-effective**_ than any of the existing solutions.\n\n👉 **Apply [here](https://forms.gle/E9MyPaNXACnAMaqG7) for early access** \n_We’ll be onboarding in phases and working closely with early users.\nLimited slots._\n\n---\n\n\n \n \n \n \n \n \n \n \n \n \n\n\nCrawl4AI turns the web into clean, LLM ready Markdown for RAG, agents, and data pipelines. Fast, controllable, battle tested by a 50k+ star community.\n\n[✨ Check out latest update v0.8.6](#-recent-updates)\n\n✨ **New in v0.8.6**: Security hotfix — replaced `litellm` with `unclecode-litellm` due to a PyPI supply chain compromise. If you're on v0.8.5, please upgrade immediately.\n\n✨ Recent v0.8.5: Anti-Bot Detection, Shadow DOM & 60+ Bug Fixes! Automatic 3-tier anti-bot detection with proxy escalation, Shadow DOM flattening, deep crawl cancellation, config defaults API, consent popup removal, and critical security patches. [Release notes →](https://github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.5.md)\n\n✨ Previous v0.8.0: Crash Recovery & Prefetch Mode! Deep crawl crash recovery with `resume_state` and `on_state_change` callbacks for long-running crawls. New `prefetch=True` mode for 5-10x faster URL discovery. [Release notes →](https://github.com/unclecode/crawl4ai/blob/main/docs/blog/release-v0.8.0.md)\n\n✨ Previous v0.7.8: Stability & Bug Fix Release! 11 bug fixes addressing Docker API issues, LLM extraction improvements, URL handling fixes, and dependency updates. [Rele
FAQ (5)
문제 해결crawl4ai v8.0.0 Docker에서 API hooks가 'ImportError: __import__ not found'로 실패하는 이유는 무엇인가요?
이것은 v8.0.0에서 알려진 회귀 버그로, 지나치게 제한적인 빌트인 화이트리스트(PR #1712)로 인해 발생했습니다. 훅 매니저의 내부 컴파일 단계는 exec("import asyncio", namespace)를 실행하며, 이는 __import__ 빌트인이 필요하지만 허용 목록에서 제거되었습니다. 사용자가 제공하는 훅은 사소한 것조차도 이 오류를 발생시킵니다.
**우회 방법:**
- **다운그레이드** v7.x로 (예: unclecode/crawl4ai:v7.0.0)
- **컨테이너를 제어할 수 있는 경우**, hook_manager.py를 편집하여 다음 중 하나를 수행하세요.
1. '__import__'를 allowed_builtins 목록에 다시 추가하거나
2. exec("import asyncio") / exec("import json") 줄을 직접 할당으로 대체하세요:
import asyncio, json
namespace['asyncio'] = asyncio
namespace['json'] = json
영구적인 수정을 위해 이슈 #1878을 추적하세요.
문제 해결crawl4ai에서 NlpSentenceChunking을 사용할 때 문장이 무작위 순서로 반환되는 이유는 무엇인가요?
이는 crawl4ai의 NlpSentenceChunking.chunk()에서 list(set(sens))를 사용하여 Python set이 순서를 유지하지 않기 때문에 문장 순서가 섞이는 알려진 버그입니다. 이 수정 사항은 develop 브랜치에 병합되었으며 다음 릴리스에 포함될 예정입니다.
**우회 방법**: chunking_strategy.py를 직접 편집하여 다음을 수정하십시오:
return list(set(sens)) # BUG를 다음과 같이 변경:
return sens
또는 수정된 브랜치에서 직접 설치:
pip install git+https://github.com/unclecode/crawl4ai.git@develop
이 수정은 문서 순서를 유지하고 의도적으로 중복된 문장을 보존합니다.
문제 해결crawl4ai Docker Job Queue API에서 'LLMTableExtraction 유형의 역직렬화가 허용되지 않음' 오류를 해결하는 방법?
이 버그는 async_configs.py의 역직렬화 허용 목록에 LLMTableExtraction이 누락되어 발생했습니다. crawl4ai v0.8.7 이상에서 수정되었습니다. 해결하려면 최신 버전으로 업그레이드하세요:
docker pull ghcr.io/unclecode/crawl4ai:latest
pip를 사용하는 경우 pip install crawl4ai>=0.8.7로 업데이트하세요. Docker 컨테이너를 다시 시작하여 수정 사항을 적용하세요.
문제 해결crawl4ai가 semaphore_count를 무시하고 429 'Too Many Requests' 오류를 발생시키는 이유는 무엇인가요?
DeepCrawlStrategy가 MemoryAdaptiveDispatcher를 생성할 때 CrawlerRunConfig의 semaphore_count 설정을 무시하고 기본적으로 20개의 동시 작업을 실행하여 속도 제한을 유발하는 알려진 버그입니다. 수정 버전에서는 config에서 semaphore_count를 읽어 max_session_permit으로 전달합니다.
**해결 방법: 버전 0.8.7 이상으로 업그레이드하세요:**
pip install --upgrade crawl4ai
**임시 해결 방법이 필요하다면**, 로컬 설치(0.8.7 이전)에 다음 변경 사항을 적용하세요:
crawl4ai/async_webcrawler.py 파일의 1032번째 줄 부근을 수정하세요:
max_session_permit = max(1, int(getattr(primary_cfg, "semaphore_count", 5) or 5))
dispatcher = MemoryAdaptiveDispatcher(
max_session_permit=max_session_permit,
...
)
또는 패치된 브랜치를 설치하세요:
pip install git+https://github.com/hafezparast/crawl4ai.git@fix/maysam-dispatcher-semaphore-count-1927
수정 후, config의 semaphore_count가 동시성을 적절히 제어하여 429 오류를 방지합니다.
문제 해결crawl4ai 0.8.6에서 enable_stealth=True가 navigator.webdriver를 숨기지 않는 이유는 무엇인가요?
crawl4ai 0.8.6에서 StealthAdapter가 playwright-stealth 2.x의 stealth_async/stealth_sync를 잘못 임포트하여 스텔스가 자동으로 건너뛰어집니다. Stealth 클래스를 사용하도록 어댑터를 업데이트한 crawl4ai 0.8.7로 업그레이드하세요:
pip install --upgrade crawl4ai==0.8.7
즉시 업그레이드할 수 없는 경우, 임시 해결책으로 playwright-stealth를 1.x 시리즈로 다운그레이드하세요:
pip install 'playwright-stealth<2'(이 경우 다른 의존성과 충돌할 수 있습니다.)