13 lines
445 B
Python
13 lines
445 B
Python
|
|
"""Fetcher implementations."""
|
||
|
|
from app.services.fetchers.base import BaseFetcher, FetchedItem
|
||
|
|
from app.services.fetchers.rss import RSSFetcher
|
||
|
|
|
||
|
|
__all__ = ["BaseFetcher", "FetchedItem", "RSSFetcher"]
|
||
|
|
|
||
|
|
|
||
|
|
def get_fetcher(kind: str, **kwargs) -> BaseFetcher:
|
||
|
|
if kind == "rss":
|
||
|
|
return RSSFetcher(**kwargs)
|
||
|
|
# html_list / tg_channel: Phase 2 实现,这里抛错
|
||
|
|
raise NotImplementedError(f"fetcher not implemented for kind={kind}")
|