backend 去ai化

This commit is contained in:
2026-04-20 15:53:02 +08:00
parent 7a34fc0079
commit bba6de25ac
28 changed files with 161 additions and 228 deletions
+1 -6
View File
@@ -1,14 +1,12 @@
import json
from app.database import SessionLocal
from app.crud.crud_source import create
from app.models.models import SourceType
from app.schemas.source_schema import InfoSourceCreate
# AI辅助生成:deepseek-v3-22026年3月20日
def init():
# 解析后的数据源列表
sources_data = [
{"name": "今日头条", "url": "toutiao"},
{"name": "百度热搜", "url": "baidu"},
@@ -23,11 +21,8 @@ def init():
{"name": "知乎", "url": "zhihu"}
]
# 遍历数据并发送 POST 请求
for item in sources_data:
try:
with SessionLocal() as db:
create(db, InfoSourceCreate(