refactor: slim rust acceleration surface

This commit is contained in:
jxxghp
2026-05-23 09:17:32 +08:00
parent fcbea077b7
commit 7cbfeb2377
15 changed files with 61 additions and 4737 deletions
-24
View File
@@ -12,7 +12,6 @@ from pyquery import PyQuery
from app.core.config import settings
from app.log import logger
from app.schemas.types import MediaType
from app.utils import rust_accel
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.string import StringUtils
from app.utils.url import UrlUtils
@@ -96,19 +95,6 @@ class SiteSpider:
"""
获取搜索URL
"""
rust_url = rust_accel.build_indexer_search_url({
"search": self.search,
"batch": self.batch,
"browse": self.browse,
"category": self.category,
"domain": self.domain,
"keyword": self.keyword,
"mtype": self.mtype.value if self.mtype else None,
"cat": self.cat,
"page": self.page,
})
if rust_url:
return rust_url
# 种子搜索相对路径
paths = self.search.get('paths', [])
torrentspath = ""
@@ -753,16 +739,6 @@ class SiteSpider:
# 清空旧结果
self.torrents_info_array = []
rust_torrents = rust_accel.parse_indexer_torrents(
html_text=html_text,
domain=self.domain,
list_config=self.list,
fields=self.fields,
category=self.category,
result_num=int(self.result_num),
)
if rust_torrents is not None:
return rust_torrents
html_doc = None
try:
# 解析站点文本对象