first code
This commit is contained in:
commit
b18805aa26
11 changed files with 612 additions and 0 deletions
15
handlers/base_handler.py
Normal file
15
handlers/base_handler.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue