इस प्रोजेक्ट के बारे में
Crawl4AI वेब क्रॉलिंग और स्क्रैपिंग के लिए एक ओपन-सोर्स Python लाइब्रेरी और CLI टूल है, जो साफ, LLM-रेडी Markdown आउटपुट उत्पन्न करने के लिए बनाया गया है। इसका उपयोग व्यापक रूप से RAG पाइपलाइन्स, AI एजेंट्स और डेटा एक्सट्रैक्शन वर्कफ़्लोज़ बनाने के लिए किया जाता है।
## अवलोकन
Crawl4AI वेब को नीचे के AI प्रसंस्करण के लिए उपयुक्त संरचित Markdown में बदल देता है। इसमें प्रोग्रामेटिक Python उपयोग और कमांड-लाइन इंटरफ़ेस दोनों का समर्थन है, जिनमें वैकल्पिक LLM-ड्रिवन संरचित डेटा एक्सट्रैक्शन और CSS/XPath-आधारित स्कीमा एक्सट्रैक्शन शामिल हैं।
## मुख्य क्षमताएं
### Markdown जनरेशन
- हेडिंग्स, टेबल्स और कोड ब्लॉक्स के साथ साफ़, संरचित Markdown उत्पन्न करता है
- Fit Markdown मोड शोर और अनावश्यक सामग्री को हटाने के लिए हीउरिस्टिक फ़िल्टरिंग लागू करता है
- सिटेशन-अवेयर आउटपुट जो लिंक्स को नंबर वाली रेफ़रेंस में बदलता है
- प्रश्न-संबंधी एक्सट्रैक्शन के लिए BM25-आधारित सामग्री फ़िल्टरिंग
- प्लगएबल मार्कडाउन जनरेशन रणनीतियां
### संरचित डेटा एक्सट्रैक्शन
- LiteLLM के माध्यम से LLM-ड्रिवन एक्सट्रैक्शन, ओपन-सोर्स और प्रोप्राइटरी दोनों मॉडल support करता है
- CSS selectors और XPath का उपयोग करके JSON स्कीमा-आधारित एक्सट्रैक्शन
- लक्षित प्रसंस्करण के लिए chunking रणनीतियां (topic-based, regex, sentence-level)
- semantic content matching के लिए cosine similarity search
### ब्राउज़र इंटीग्रेशन
- Playwright द्वारा संचालित async ब्राउज़र पूल
- सुरक्षित auth states और cookies के साथ user-owned ब्राउज़र प्रोफ़ाइल्स का उपयोग करने वाला managed browser मोड
- Chrome DevTools Protocol के माध्यम से रिमोट ब्राउज़र कंट्रोल
- authentication के साथ proxy support
- bot detection कम करने के लिए stealth mode
- Multi-browser support (Chromium, Firefox, WebKit)
- Dynamic viewport adjustment
### क्रॉलिंग फ़ीचर्स
- Dynamic content के लिए async/sync wait support के साथ JavaScript execution
- क्रॉलिंग के दौरान screenshot capture
- Media extraction (images, audio, video, responsive srcset/picture formats)
- Raw HTML और local file processing
- iframe content सहित comprehensive link extraction
- Lazy load handling और infinite scroll के लिए full-page scanning
- हर क्रॉल स्टेप पर hook-based कस्टमाइज़ेशन
- Built-in caching
### डिप्लॉयमेंट
- API-based workflows के लिए Dockerized FastAPI server
- JWT token authentication (recent versions में डिफ़ॉल्ट रूप से सक्षम)
- `/dashboard` और `/playground` पर monitoring dashboard और interactive playground
- AI tool connections के लिए MCP integration
- Multi-architecture Docker images (AMD64/ARM64)
- Cloud deployment ready
## इंस्टॉलेशन
```bash
pip install -U crawl4ai
crawl4ai-setup
```
Manual Playwright इंस्टॉलेशन के लिए:
```bash
python -m playwright install --with-deps chromium
```
## उपयोग
### Python API
```python
import asyncio
from crawl4ai import AsyncWebCrawler
async def main():
async with AsyncWebCrawler() as crawler:
result = await crawler.arun(url="https://example.com")
print(result.markdown)
asyncio.run(main())
```
### CLI
```bash
# Basic crawl
crwl https://example.com -o markdown
# Deep crawl
crwl https://example.com --deep-crawl bfs --max-pages 10
# LLM extraction
crwl https://example.com -q "Extract all product prices"
```
### Docker
```bash
docker pull unclecode/crawl4ai:latest
docker run -d -p 11235:11235 --name crawl4ai --shm-size=1g unclecode/crawl4ai:latest
```
फिर monitoring UI के लिए `http://localhost:11235/dashboard` या interactive test environment के लिए `http://localhost:11235/playground` देखें।
## प्रोजेक्ट विवरण
- Repository: unclecode/crawl4ai
- PyPI: crawl4ai
- Documentation: https://docs.crawl4ai.com/
- Discord community: https://discord.gg/jP8KfhDhyN
- Sponsors: https://github.com/sponsors/unclecode
यह प्रोजेक्ट खुली उपलब्धता और किफ़ायती की ओर जोर देता है, खुद को commercial web extraction APIs के लिए self-hosted विकल्प के रूप में रखता है। इसके पास 50,000 से अधिक GitHub stars हैं और यह नियमित रिलीज़ के माध्यम से सुरक्षा को सक्रिय रूप से बनाए रखता है।
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.