33 lines
744 B
Python
33 lines
744 B
Python
"""新闻抓取模块 (M1)。
|
|
|
|
公共 API:
|
|
- load_crawler_config: 加载 sources.yaml
|
|
- crawl_all: 一键抓取所有启用的源
|
|
- crawl_source: 抓取单个源(供测试/调试)
|
|
- CrawlerConfig / SourceConfig / CrawlResult: 数据模型
|
|
"""
|
|
|
|
from .config import load_crawler_config
|
|
from .engine import crawl_all, crawl_source, extract_article_links
|
|
from .models import (
|
|
ArticleLink,
|
|
CrawlerConfig,
|
|
CrawlerSettings,
|
|
CrawlResult,
|
|
CrawlStage,
|
|
SourceConfig,
|
|
)
|
|
|
|
__all__ = [
|
|
"ArticleLink",
|
|
"CrawlResult",
|
|
"CrawlStage",
|
|
"CrawlerConfig",
|
|
"CrawlerSettings",
|
|
"SourceConfig",
|
|
"crawl_all",
|
|
"crawl_source",
|
|
"extract_article_links",
|
|
"load_crawler_config",
|
|
]
|