修复AB当作Proxy无法获取海报的问题。

移除 RSS 检查器
This commit is contained in:
EstrellaXD
2023-05-19 00:14:16 +08:00
parent 4b50f210dc
commit 9aa6b09005
8 changed files with 33 additions and 19 deletions

View File

@@ -69,4 +69,16 @@ async def get_rss(full_path: str):
@router.get("/Download/{full_path:path}", tags=["proxy"])
async def download(full_path: str):
torrent = get_torrent(full_path)
return Response(torrent, media_type="application/x-bittorrent")
return Response(torrent, media_type="application/x-bittorrent")
@router.get("/Home/Episode/{full_path:path}", tags=["proxy"])
async def get_ep_info(full_path: str):
url = f"https://mikanani.me/Home/Episode/{full_path}"
try:
with RequestContent() as request:
return Response(request.get_html(url), media_type="text/html")
except Exception as e:
logger.debug(e)
logger.warning("Failed to get ep info")
raise HTTPException(status_code=500, detail="Failed to get ep info")