mirror of
https://github.com/saveweb/biliarchiver.git
synced 2024-09-19 11:05:28 -07:00
fix: get_list_info was mistakenly as get_collect_info
This commit is contained in:
parent
8d3cd53832
commit
8911ce404c
@ -26,7 +26,7 @@ async def by_series(url_or_sid: str, truncate: int = int(1e10)) -> Path:
|
||||
) # type: ignore
|
||||
client = AsyncClient(**api.dft_client_settings)
|
||||
print(_("正在获取 {sid} 的视频列表……").format(sid=sid))
|
||||
col_name, up_name, bvids = await api.get_collect_info(client, sid)
|
||||
col_name, up_name, bvids = await api.get_list_info(client, sid)
|
||||
filepath = f"bvids/by-sapce_fav_season/sid-{sid}-{int(time.time())}.txt"
|
||||
os.makedirs(os.path.dirname(filepath), exist_ok=True)
|
||||
abs_filepath = os.path.abspath(filepath)
|
||||
|
@ -111,7 +111,7 @@ async def source_action(fun, source_id: str, TRUNCATE=20):
|
||||
txt_path = await fun(source_id, truncate=TRUNCATE)
|
||||
except Exception as e:
|
||||
print(f"Failed to call {fun}: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Failed to call {fun}")
|
||||
raise HTTPException(status_code=500, detail=f"Failed to call {fun}: {e}")
|
||||
if not isinstance(txt_path, Path):
|
||||
raise HTTPException(status_code=500, detail="Failed to get path")
|
||||
|
||||
@ -120,6 +120,7 @@ async def source_action(fun, source_id: str, TRUNCATE=20):
|
||||
|
||||
return {"success": True, "bvids": bvids}
|
||||
|
||||
@app.get("/get_bvids_by/{source_type}/{source_id}")
|
||||
@app.post("/get_bvids_by/{source_type}/{source_id}")
|
||||
async def perform_source_action_from_req(source_type: str, source_id: str):
|
||||
# make sure source_id is valid integer
|
||||
|
Loading…
Reference in New Issue
Block a user