15 lines
No EOL
382 B
Python
15 lines
No EOL
382 B
Python
from abc import ABC, abstractmethod
|
|
from typing import Dict, Any, List
|
|
|
|
class BaseHandler(ABC):
|
|
"""基础处理器类"""
|
|
|
|
@abstractmethod
|
|
def handle(self, **kwargs) -> List[Dict[str, Any]]:
|
|
"""处理请求并返回RSS项目列表"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_handler_name(self) -> str:
|
|
"""返回处理器名称"""
|
|
pass |