mirror of
https://github.com/stardrophere/InsightRadar.git
synced 2026-06-06 00:00:05 +08:00
backend 去ai化
This commit is contained in:
@@ -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-2,2026年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(
|
||||
|
||||
Reference in New Issue
Block a user