add storage

This commit is contained in:
jxxghp
2024-06-30 08:59:12 +08:00
parent 77632880d1
commit 63ca5ee313
24 changed files with 367 additions and 194 deletions

View File

@@ -14,8 +14,6 @@ from app.log import logger
from app.utils.http import RequestUtils
from app.utils.site import SiteUtils
SITE_BASE_ORDER = 1000
# 站点框架
class SiteSchema(Enum):
@@ -39,8 +37,6 @@ class SiteSchema(Enum):
class SiteParserBase(metaclass=ABCMeta):
# 站点模版
schema = SiteSchema.NexusPhp
# 站点解析时判断顺序,值越小越先解析
order = SITE_BASE_ORDER
# 请求模式 cookie/apikey
request_mode = "cookie"
@@ -155,15 +151,6 @@ class SiteParserBase(metaclass=ABCMeta):
"""
return self.schema
@classmethod
def match(cls, html_text: str) -> bool:
"""
是否匹配当前解析模型
:param html_text: 站点首页html
:return: 是否匹配
"""
pass
def parse(self):
"""
解析站点信息