v0.2.7: 修复Redis连接 + 启动管理后台
- 修复Redis认证 (配置密码) - 启动Python管理后台 (端口9531, 15个功能开关) - 统一版本号 0.2.7 - 更新docker-compose.yml (镜像版本/Redis URL/Admin服务)
This commit is contained in:
26
cloudsearch_transfer/adapter/pan123/cleanup.py
Normal file
26
cloudsearch_transfer/adapter/pan123/cleanup.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""123云盘数据清理 v1.0.0"""
|
||||
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Pan123Cleanup:
|
||||
API_BASE = "https://www.123pan.com/api"
|
||||
|
||||
def delete_files(self, session, credential_mgr, file_ids: List[str]) -> bool:
|
||||
try:
|
||||
resp = session.post(
|
||||
f"{self.API_BASE}/file/delete",
|
||||
json={"fileIds": file_ids},
|
||||
timeout=30,
|
||||
)
|
||||
return resp.json().get("code") == 0
|
||||
except Exception as e:
|
||||
logger.error(f"123 delete failed: {e}")
|
||||
return False
|
||||
|
||||
def filter_ad_ids(self, file_ids: List[str], file_names: List[str],
|
||||
banned_keywords: List[str]) -> List[str]:
|
||||
return file_ids
|
||||
Reference in New Issue
Block a user