deep-markdown-crawler 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deep_markdown_crawler-1.0.0/PKG-INFO +45 -0
- deep_markdown_crawler-1.0.0/README.md +29 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler/__init__.py +9 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler/client.py +31 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler.egg-info/PKG-INFO +45 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler.egg-info/SOURCES.txt +10 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler.egg-info/dependency_links.txt +1 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler.egg-info/requires.txt +2 -0
- deep_markdown_crawler-1.0.0/deep_markdown_crawler.egg-info/top_level.txt +1 -0
- deep_markdown_crawler-1.0.0/pyproject.toml +14 -0
- deep_markdown_crawler-1.0.0/setup.cfg +4 -0
- deep_markdown_crawler-1.0.0/setup.py +23 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deep-markdown-crawler
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Universal Website to Clean Markdown Crawler SDK.
|
|
5
|
+
Home-page: https://github.com/meanusarcanus/deep-markdown-crawler-api
|
|
6
|
+
Author: Meanus Arcanus
|
|
7
|
+
Author-email: meanusarcanus@gmail.com
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.25.0
|
|
11
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: author-email
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
|
|
17
|
+
# 📄 DeepCrawl AI — Universal Website to Markdown Crawler SDK
|
|
18
|
+
|
|
19
|
+
Official Python SDK for **DeepCrawl AI** (Open-Source Firecrawl Alternative).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## âš¡ Quickstart
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install deep-markdown-crawler
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from deep_markdown_crawler import scrape_url_to_markdown, crawl_domain_to_markdown
|
|
31
|
+
|
|
32
|
+
# 1. Scrape Single URL to Clean Markdown
|
|
33
|
+
doc = scrape_url_to_markdown("https://fastapi.tiangolo.com/tutorial/")
|
|
34
|
+
print(f"Title: {doc['title']} | Tokens: ~{doc['token_count']}")
|
|
35
|
+
print(doc['markdown'][:500])
|
|
36
|
+
|
|
37
|
+
# 2. Deep Crawl Entire Documentation Domain
|
|
38
|
+
crawl = crawl_domain_to_markdown(
|
|
39
|
+
start_url="https://fastapi.tiangolo.com/tutorial/",
|
|
40
|
+
max_pages=5,
|
|
41
|
+
max_depth=2
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
print(f"Crawled {crawl['total_pages_crawled']} pages ({crawl['total_tokens_estimated']} tokens).")
|
|
45
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# 📄 DeepCrawl AI — Universal Website to Markdown Crawler SDK
|
|
2
|
+
|
|
3
|
+
Official Python SDK for **DeepCrawl AI** (Open-Source Firecrawl Alternative).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## âš¡ Quickstart
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install deep-markdown-crawler
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from deep_markdown_crawler import scrape_url_to_markdown, crawl_domain_to_markdown
|
|
15
|
+
|
|
16
|
+
# 1. Scrape Single URL to Clean Markdown
|
|
17
|
+
doc = scrape_url_to_markdown("https://fastapi.tiangolo.com/tutorial/")
|
|
18
|
+
print(f"Title: {doc['title']} | Tokens: ~{doc['token_count']}")
|
|
19
|
+
print(doc['markdown'][:500])
|
|
20
|
+
|
|
21
|
+
# 2. Deep Crawl Entire Documentation Domain
|
|
22
|
+
crawl = crawl_domain_to_markdown(
|
|
23
|
+
start_url="https://fastapi.tiangolo.com/tutorial/",
|
|
24
|
+
max_pages=5,
|
|
25
|
+
max_depth=2
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
print(f"Crawled {crawl['total_pages_crawled']} pages ({crawl['total_tokens_estimated']} tokens).")
|
|
29
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DeepCrawl AI — Universal Website to Markdown Crawler SDK
|
|
3
|
+
Official Python client for deep website and documentation crawling into clean Markdown.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .client import DeepMarkdownCrawler, scrape_url_to_markdown, crawl_domain_to_markdown
|
|
7
|
+
|
|
8
|
+
__version__ = "1.0.0"
|
|
9
|
+
__all__ = ["DeepMarkdownCrawler", "scrape_url_to_markdown", "crawl_domain_to_markdown"]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Dict, Any, Optional
|
|
3
|
+
|
|
4
|
+
def scrape_url_to_markdown(url: str, base_url: str = "https://deep-markdown-crawler-api.vercel.app") -> Dict[str, Any]:
|
|
5
|
+
"""Scrape a single URL into clean Markdown."""
|
|
6
|
+
endpoint = f"{base_url.rstrip('/')}/api/v1/scrape"
|
|
7
|
+
try:
|
|
8
|
+
res = requests.post(endpoint, json={"url": url}, timeout=25)
|
|
9
|
+
return res.json()
|
|
10
|
+
except Exception as e:
|
|
11
|
+
return {"status": "error", "message": str(e)}
|
|
12
|
+
|
|
13
|
+
def crawl_domain_to_markdown(start_url: str, max_pages: int = 5, max_depth: int = 2, base_url: str = "https://deep-markdown-crawler-api.vercel.app") -> Dict[str, Any]:
|
|
14
|
+
"""Crawl a full domain or doc portal into clean Markdown."""
|
|
15
|
+
endpoint = f"{base_url.rstrip('/')}/api/v1/crawl"
|
|
16
|
+
try:
|
|
17
|
+
res = requests.post(endpoint, json={"start_url": start_url, "max_pages": max_pages, "max_depth": max_depth}, timeout=45)
|
|
18
|
+
return res.json()
|
|
19
|
+
except Exception as e:
|
|
20
|
+
return {"status": "error", "message": str(e)}
|
|
21
|
+
|
|
22
|
+
class DeepMarkdownCrawler:
|
|
23
|
+
def __init__(self, api_key: Optional[str] = None, base_url: str = "https://deep-markdown-crawler-api.vercel.app"):
|
|
24
|
+
self.api_key = api_key
|
|
25
|
+
self.base_url = base_url.rstrip("/")
|
|
26
|
+
|
|
27
|
+
def scrape(self, url: str) -> Dict[str, Any]:
|
|
28
|
+
return scrape_url_to_markdown(url, base_url=self.base_url)
|
|
29
|
+
|
|
30
|
+
def crawl(self, start_url: str, max_pages: int = 5, max_depth: int = 2) -> Dict[str, Any]:
|
|
31
|
+
return crawl_domain_to_markdown(start_url, max_pages=max_pages, max_depth=max_depth, base_url=self.base_url)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deep-markdown-crawler
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Universal Website to Clean Markdown Crawler SDK.
|
|
5
|
+
Home-page: https://github.com/meanusarcanus/deep-markdown-crawler-api
|
|
6
|
+
Author: Meanus Arcanus
|
|
7
|
+
Author-email: meanusarcanus@gmail.com
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.25.0
|
|
11
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: author-email
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
|
|
17
|
+
# 📄 DeepCrawl AI — Universal Website to Markdown Crawler SDK
|
|
18
|
+
|
|
19
|
+
Official Python SDK for **DeepCrawl AI** (Open-Source Firecrawl Alternative).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## âš¡ Quickstart
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install deep-markdown-crawler
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from deep_markdown_crawler import scrape_url_to_markdown, crawl_domain_to_markdown
|
|
31
|
+
|
|
32
|
+
# 1. Scrape Single URL to Clean Markdown
|
|
33
|
+
doc = scrape_url_to_markdown("https://fastapi.tiangolo.com/tutorial/")
|
|
34
|
+
print(f"Title: {doc['title']} | Tokens: ~{doc['token_count']}")
|
|
35
|
+
print(doc['markdown'][:500])
|
|
36
|
+
|
|
37
|
+
# 2. Deep Crawl Entire Documentation Domain
|
|
38
|
+
crawl = crawl_domain_to_markdown(
|
|
39
|
+
start_url="https://fastapi.tiangolo.com/tutorial/",
|
|
40
|
+
max_pages=5,
|
|
41
|
+
max_depth=2
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
print(f"Crawled {crawl['total_pages_crawled']} pages ({crawl['total_tokens_estimated']} tokens).")
|
|
45
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
deep_markdown_crawler/__init__.py
|
|
5
|
+
deep_markdown_crawler/client.py
|
|
6
|
+
deep_markdown_crawler.egg-info/PKG-INFO
|
|
7
|
+
deep_markdown_crawler.egg-info/SOURCES.txt
|
|
8
|
+
deep_markdown_crawler.egg-info/dependency_links.txt
|
|
9
|
+
deep_markdown_crawler.egg-info/requires.txt
|
|
10
|
+
deep_markdown_crawler.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
deep_markdown_crawler
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "deep-markdown-crawler"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Universal Website to Clean Markdown Crawler SDK."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"requests>=2.25.0",
|
|
13
|
+
"beautifulsoup4>=4.12.0"
|
|
14
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="deep-markdown-crawler",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
description="Universal Website to Clean Markdown Crawler SDK (Firecrawl Alternative).",
|
|
7
|
+
long_description=open("README.md").read() if open("README.md") else "",
|
|
8
|
+
long_description_content_type="text/markdown",
|
|
9
|
+
author="Meanus Arcanus",
|
|
10
|
+
author_email="meanusarcanus@gmail.com",
|
|
11
|
+
url="https://github.com/meanusarcanus/deep-markdown-crawler-api",
|
|
12
|
+
packages=find_packages(),
|
|
13
|
+
install_requires=[
|
|
14
|
+
"requests>=2.25.0",
|
|
15
|
+
"beautifulsoup4>=4.12.0",
|
|
16
|
+
],
|
|
17
|
+
classifiers=[
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
],
|
|
22
|
+
python_requires=">=3.8",
|
|
23
|
+
)
|