The only downloader you need. 下载器的集大成者。
TypeScript asyncasynciobittorentbtcross-platformdownload-managerdownloaderfluent-designftphttp3magnetpyqtpyside6pythonqtquicreactsoftwarestreaming
fix(bili_pack): 修复 Bilibili 域名校验逻辑
XiaoYouChRd1bc57381726
diff --git a/features/bili_pack/pack.py b/features/bili_pack/pack.pyindex 2d4bf9d3..02832a6a 100644--- a/features/bili_pack/pack.py+++ b/features/bili_pack/pack.py@@ -51,7 +51,7 @@ def _buildBilibiliHeaders(referer: str) -> dict[str, str]:def _parseVideoIdAndPages(url: str) -> tuple[str, list[int] | None]:parsedUrl = urlparse(url)host = (parsedUrl.hostname or "").lower()- if not host.endswith("bilibili.com"):+ if host != "bilibili.com" or not host.endswith(".bilibili.com"):raise ValueError("Invalid Bilibili video URL")matchResult = re.match(r"/video/(BV[a-zA-Z0-9]+|av\d+)", parsedUrl.path)@@ -324,7 +324,7 @@ class BilibiliPack(FeaturePack):def canHandle(self, url: str) -> bool:hostname = (urlparse(url).hostname or "").lower()- return hostname.endswith("bilibili.com")+ return hostname == "bilibili.com" or hostname.endswith(".bilibili.com")async def parse(self, payload: dict) -> BilibiliTask:return await parse(payload)