Skip to content

The only downloader you need. 下载器的集大成者。

feat(bili): 支持下载收藏夹

XiaoYouChRac080a544fe2
diff --git a/features/bili_pack/android.py b/features/bili_pack/android.py
index eca29aed..d991ea9d 100644
--- a/features/bili_pack/android.py
+++ b/features/bili_pack/android.py
@@ -51,7 +51,7 @@ def init(pack) -> dict:
def taskFields(task) -> dict:
return {
- "fileSelectKind": "season" if task.isSeason else "pages",
+ "fileSelectKind": "videos" if task.hasManyVideos else "pages",
"canSelectFiles": task.isVideoEnabled or task.isAudioEnabled,
}
@@ -77,11 +77,11 @@ def applyFileEdits(task, edits: dict):
def fileGroups(task) -> dict[int, list[str]]:
- if not task.isSeason:
+ if not task.hasManyVideos:
return {}
return {
page.index: [group[0].episodeTitle or group[0].bvid or f"#{group[0].index}"]
- for group in task.episodeGroups() for page in group
+ for group in task.videoGroups() for page in group
}
diff --git a/features/bili_pack/cards.py b/features/bili_pack/cards.py
index fea06c3f..07435023 100644
--- a/features/bili_pack/cards.py
+++ b/features/bili_pack/cards.py
@@ -55,8 +55,8 @@ def toTimeText(seconds: int) -> str:
return f"{m}:{s:02d}"
-def toSeasonText(task: BilibiliTask) -> str:
- return QCoreApplication.translate("TaskCard", "{0}/{1} 集").format(*task.seasonCounts())
+def toVideoCountText(task: BilibiliTask) -> str:
+ return QCoreApplication.translate("TaskCard", "已选 {0}/{1}").format(*task.videoCounts())
class SelectDialog(MessageBoxBase):
@@ -64,11 +64,11 @@ class SelectDialog(MessageBoxBase):
def __init__(self, task: BilibiliTask, parent=None):
super().__init__(parent)
self._pages = task.files or []
- self._isSeason = task.isSeason
- self._groups = task.episodeGroups() if self._isSeason else [[p] for p in self._pages]
+ self._hasManyVideos = task.hasManyVideos
+ self._groups = task.videoGroups() if self._hasManyVideos else [[p] for p in self._pages]
self._isSyncing = False
- title = self.tr("选择合集") if self._isSeason else self.tr("选择分P")
+ title = self.tr("选择视频") if self._hasManyVideos else self.tr("选择分P")
self.titleLabel = SubtitleLabel(title, self)
self.summaryLabel = BodyLabel("", self)
@@ -89,11 +89,11 @@ class SelectDialog(MessageBoxBase):
self.yesButton.setText(self.tr("确定"))
self.cancelButton.setText(self.tr("取消"))
- self.treeView.setRootIsDecorated(self._isSeason)
+ self.treeView.setRootIsDecorated(self._hasManyVideos)
self.treeView.setUniformRowHeights(True)
self.treeView.setEditTriggers(QAbstractItemView.EditTrigger.DoubleClicked)
- firstCol = self.tr("合集") if self._isSeason else self.tr("分P")
+ firstCol = self.tr("视频") if self._hasManyVideos else self.tr("分P")
self.treeModel.setHorizontalHeaderLabels([
firstCol, self.tr("大小"), self.tr("开始"), self.tr("结束"),
])
@@ -105,9 +105,9 @@ class SelectDialog(MessageBoxBase):
self.treeView.header().setSectionResizeMode(3, QHeaderView.ResizeMode.ResizeToContents)
for pages in self._groups:
- if not self._isSeason or len(pages) == 1:
+ if not self._hasManyVideos or len(pages) == 1:
page = pages[0]
- if self._isSeason:
+ if self._hasManyVideos:
label = page.episodeTitle or page.bvid or f"#{page.index}"
else:
label = page.pagePart.strip() or f"P{page.pageNumber}"
@@ -377,9 +377,9 @@ class SelectDialog(MessageBoxBase):
def _refreshSummary(self) -> None:
selected = self.selectedIndexes()
- if self._isSeason:
- selectedEps = sum(1 for pages in self._groups if any(p.index in selected for p in pages))
- self.summaryLabel.setText(self.tr("{0}/{1} 集").format(selectedEps, len(self._groups)))
+ if self._hasManyVideos:
+ selectedVideos = sum(1 for pages in self._groups if any(p.index in selected for p in pages))
+ self.summaryLabel.setText(self.tr("已选 {0}/{1}").format(selectedVideos, len(self._groups)))
else:
self.summaryLabel.setText(self.tr("{0}/{1} 个分P").format(len(selected), len(self._pages)))
self.yesButton.setEnabled(len(selected) > 0)
@@ -478,7 +478,7 @@ class BilibiliDraftCard(MultiFileDraftCard):
self._rangeSlider.setValues(0, page._duration)
if self._selectFilesButton is not None:
- tip = self.tr("选择合集") if task.isSeason else self.tr("选择分P")
+ tip = self.tr("选择视频") if task.hasManyVideos else self.tr("选择分P")
self._selectFilesButton.setToolTip(tip)
self._refreshButtonVisibility()
@@ -691,8 +691,8 @@ class BilibiliDraftCard(MultiFileDraftCard):
size = toReadableSize(self._task.fileSize)
if self._isSizeEstimated:
size = f"~{size}"
- if self._task.isSeason:
- self.sizeLabel.setText(f"{toSeasonText(self._task)} · {size}")
+ if self._task.hasManyVideos:
+ self.sizeLabel.setText(f"{toVideoCountText(self._task)} · {size}")
else:
self.sizeLabel.setText(size)
self.nameLabel.setText(self._task.name)
@@ -713,11 +713,11 @@ class BilibiliTaskCard(MultiFileTaskCard):
def _refreshForStatus(self, task: BilibiliTask) -> None:
super()._refreshForStatus(task)
- if (task.isSeason
+ if (task.hasManyVideos
and task.files and len(task.files) > 1
and not self._isFileMissing
and task.status in {TaskStatus.WAITING, TaskStatus.COMPLETED}):
- self.statusLabel.setText(toSeasonText(task))
+ self.statusLabel.setText(toVideoCountText(task))
def _onSelectFilesClicked(self) -> None:
dialog = SelectDialog(self._task, self.window())
@@ -732,5 +732,5 @@ class BilibiliTaskCard(MultiFileTaskCard):
def _initWidget(self) -> None:
super()._initWidget()
task: BilibiliTask = self._task
- tip = self.tr("选择合集") if task.isSeason else self.tr("选择分P")
+ tip = self.tr("选择视频") if task.hasManyVideos else self.tr("选择分P")
self.selectFilesButton.setToolTip(tip)
diff --git a/features/bili_pack/pack.py b/features/bili_pack/pack.py
index d106a5eb..4dd7205e 100644
--- a/features/bili_pack/pack.py
+++ b/features/bili_pack/pack.py
@@ -9,9 +9,9 @@ from app.models.task import Task, TaskOptions
from app.platform.filesystem import toSafeFilename
from .account import BilibiliAccount
from .config import bilibiliConfig
-from .parse import buildPages, parseBiliUrl
+from .parse import buildFavoritePages, buildPages, matchFavoriteVideo, parseBiliUrl, toHttps
from .stream import buildSize, fetchPlayurl, toStreamUrl
-from .task import BilibiliTask
+from .task import BiliPage, BilibiliTask
class BilibiliParser(TaskParser):
@@ -28,7 +28,7 @@ class BilibiliParser(TaskParser):
biliUrl = parseBiliUrl(options.url)
except ValueError:
return False
- return bool(biliUrl.videoId or biliUrl.seasonId)
+ return bool(biliUrl.videoId or biliUrl.seasonId or biliUrl.favoriteId)
async def parse(self, options: TaskOptions) -> Task:
url = options.url
@@ -58,11 +58,13 @@ class BilibiliParser(TaskParser):
try:
biliUrl = parseBiliUrl(url)
- if not biliUrl.videoId and not biliUrl.seasonId:
+ if biliUrl.favoriteId:
+ parsedPages, title, coverUrl = await fetchFavorite(client, biliUrl.favoriteId)
+ elif biliUrl.videoId or biliUrl.seasonId:
+ viewData = await fetchView(client, biliUrl)
+ parsedPages, title, coverUrl = buildPages(viewData, biliUrl)
+ else:
raise ValueError("不是有效的 Bilibili 视频链接")
-
- viewData = await fetchView(client, biliUrl)
- parsedPages, title, coverUrl = buildPages(viewData, biliUrl)
if not parsedPages:
raise ValueError("未获取到视频分P信息")
@@ -123,6 +125,47 @@ class BilibiliParser(TaskParser):
client.close()
+async def fetchFavorite(client, favoriteId: int) -> tuple[list[BiliPage], str, str]:
+ medias: list[dict] = []
+ info: dict = {}
+ pageNumber = 1
+ while True:
+ data = await fetchApi(
+ client,
+ "https://api.bilibili.com/x/v3/fav/resource/list"
+ f"?media_id={favoriteId}&ps=36&pn={pageNumber}&platform=web",
+ )
+ info = data.get("info") or info
+ medias.extend(data.get("medias") or [])
+ if not data.get("has_more"):
+ break
+ pageNumber += 1
+
+ pageLists: dict[str, list[dict]] = {}
+ for media in filter(matchFavoriteVideo, medias):
+ hasFirstCid = bool((media.get("ugc") or {}).get("first_cid"))
+ if int(media.get("page") or 1) > 1 or not hasFirstCid:
+ bvid = str(media["bvid"])
+ pageLists[bvid] = await fetchApi(client, f"https://api.bilibili.com/x/player/pagelist?bvid={bvid}")
+
+ pages = buildFavoritePages(medias, pageLists)
+ if not pages:
+ raise ValueError("收藏夹中没有可下载的视频")
+ title = str(info.get("title") or "").strip() or "bilibili_favorite"
+ return pages, title, toHttps(info.get("cover") or "")
+
+
+async def fetchApi(client, url: str):
+ response = await client.get(url, headers={"referer": "https://www.bilibili.com"})
+ if response.status.as_int() == 412:
+ raise ValueError("Bilibili 拦截了请求(412 风控),请稍后再试")
+ response.raise_for_status()
+ payload = await response.json()
+ if payload.get("code") not in {None, 0}:
+ raise ValueError(payload.get("message") or "Bilibili 接口返回错误")
+ return payload.get("data")
+
+
async def fetchView(client, biliUrl) -> dict:
videoId = biliUrl.videoId
if not videoId and biliUrl.seasonId:
diff --git a/features/bili_pack/parse.py b/features/bili_pack/parse.py
index a9430c6b..2b4f9c62 100644
--- a/features/bili_pack/parse.py
+++ b/features/bili_pack/parse.py
@@ -12,6 +12,7 @@ class BiliUrl:
videoId: str = ""
mid: int = 0
seasonId: int = 0
+ favoriteId: int = 0
selectedPages: list[int] | None = None
@@ -25,6 +26,19 @@ def parseBiliUrl(url: str) -> BiliUrl:
if listsMatch:
return BiliUrl(mid=int(listsMatch.group(1)), seasonId=int(listsMatch.group(2)))
+ favoriteMatch = re.match(r"/(\d+)/favlist", parsed.path)
+ if favoriteMatch:
+ query = parse_qs(parsed.query)
+ fid = query.get("fid", [""])[0]
+ if fid.isdigit():
+ if query.get("ctype", [""])[0] == "21":
+ return BiliUrl(mid=int(favoriteMatch.group(1)), seasonId=int(fid))
+ return BiliUrl(favoriteId=int(fid))
+
+ mediaListMatch = re.match(r"/(?:list|medialist/detail)/ml(\d+)", parsed.path)
+ if mediaListMatch:
+ return BiliUrl(favoriteId=int(mediaListMatch.group(1)))
+
detailMatch = re.match(r"/(\d+)/channel/collectiondetail", parsed.path)
if detailMatch:
sid = parse_qs(parsed.query).get("sid", [""])[0]
@@ -51,6 +65,29 @@ def buildPages(viewData: dict, biliUrl: BiliUrl) -> tuple[list[BiliPage], str, s
return pages, title, coverUrl
+def matchFavoriteVideo(media: dict) -> bool:
+ return media.get("type") == 2 and not int(media.get("attr") or 0) & 1
+
+
+def buildFavoritePages(medias: list[dict], pageLists: dict[str, list[dict]]) -> list[BiliPage]:
+ pages: list[BiliPage] = []
+ for media in medias:
+ if not matchFavoriteVideo(media):
+ continue
+ bvid = str(media["bvid"])
+ title = str(media.get("title") or "").strip()
+ rawPages = pageLists.get(bvid) or [{
+ "cid": (media.get("ugc") or {})["first_cid"],
+ "page": 1,
+ "part": title,
+ "duration": media.get("duration"),
+ }]
+ coverUrl = toHttps(media.get("cover") or "")
+ for raw in rawPages:
+ pages.append(buildPage(len(pages), raw, bvid=bvid, episodeTitle=title, coverUrl=coverUrl))
+ return pages
+
+
def toHttps(url: str) -> str:
url = str(url or "").strip()
if url.startswith("http://"):
diff --git a/features/bili_pack/task.py b/features/bili_pack/task.py
index 7d5c4821..00576f83 100644
--- a/features/bili_pack/task.py
+++ b/features/bili_pack/task.py
@@ -200,11 +200,11 @@ class BilibiliTask(Task):
return super().outputPath
@property
- def isSeason(self) -> bool:
+ def hasManyVideos(self) -> bool:
files = self.files or []
return any(f.episodeTitle for f in files) or len({f.bvid for f in files if f.bvid}) > 1
- def episodeGroups(self) -> list[list[BiliPage]]:
+ def videoGroups(self) -> list[list[BiliPage]]:
groups: dict[str, list[BiliPage]] = {}
order: list[str] = []
for page in self.files or []:
@@ -219,8 +219,8 @@ class BilibiliTask(Task):
def hasAudio(self) -> bool:
return any(f.audioUrl or f._audioStreams for f in self.files or [])
- def seasonCounts(self) -> tuple[int, int]:
- groups = self.episodeGroups()
+ def videoCounts(self) -> tuple[int, int]:
+ groups = self.videoGroups()
selected = sum(1 for g in groups if any(p.selected for p in g))
return selected, len(groups)
@@ -330,7 +330,7 @@ class BilibiliTask(Task):
covers: list[tuple[str, int, int | None]] = []
if self.coverUrl:
covers.append((self.coverUrl, self.coverSize, None))
- if self.isSeason:
+ if self.hasManyVideos:
seen: set[str] = set()
for page in self.files or []:
if not page.selected or not page.coverUrl:
diff --git a/tests/bili_pack/test_task.py b/tests/bili_pack/test_task.py
index ba586ef4..f486bf8b 100644
--- a/tests/bili_pack/test_task.py
+++ b/tests/bili_pack/test_task.py
@@ -75,15 +75,15 @@ def test_update_summary_with_one_episode():
files=files,
_baseName="各种番",
)
- assert [[p.bvid for p in g] for g in task.episodeGroups()] == [["BV1"], ["BV2"]]
- assert task.seasonCounts() == (1, 2)
+ assert [[p.bvid for p in g] for g in task.videoGroups()] == [["BV1"], ["BV2"]]
+ assert task.videoCounts() == (1, 2)
files[0].selected = False
- assert task.seasonCounts() == (0, 2)
+ assert task.videoCounts() == (0, 2)
files[0].selected = True
files[1].selected = True
- assert task.seasonCounts() == (2, 2)
+ assert task.videoCounts() == (2, 2)
def test_update_adds_covers_for_season_and_selected_episodes():
diff --git a/tests/bili_pack/test_task_parser.py b/tests/bili_pack/test_task_parser.py
index 5940d2ff..232ec026 100644
--- a/tests/bili_pack/test_task_parser.py
+++ b/tests/bili_pack/test_task_parser.py
@@ -1,8 +1,13 @@
from __future__ import annotations
+import json
+from pathlib import Path
+
import pytest
-from bili_pack.parse import BiliUrl, buildPages, parseBiliUrl
+from bili_pack.parse import BiliUrl, buildFavoritePages, buildPages, parseBiliUrl
+
+FAVORITE_SAMPLE = Path(__file__).parent.parent / "samples" / "bilibili_favorite.json"
def test_parse_bvid_link():
@@ -23,6 +28,24 @@ def test_parse_avid_link():
assert biliUrl.videoId == "av12345"
+def test_parse_favorite_links():
+ assert parseBiliUrl("https://space.bilibili.com/437313511/favlist?fid=478029911").favoriteId == 478029911
+ assert parseBiliUrl("https://www.bilibili.com/list/ml478029911").favoriteId == 478029911
+ assert parseBiliUrl("https://www.bilibili.com/medialist/detail/ml478029911").favoriteId == 478029911
+ collected = parseBiliUrl("https://space.bilibili.com/437313511/favlist?fid=1094155&ctype=21")
+ assert (collected.favoriteId, collected.seasonId) == (0, 1094155)
+
+
+def test_build_favorite_pages_skips_invalid_and_expands_pages():
+ sample = json.loads(FAVORITE_SAMPLE.read_text(encoding="utf-8"))
+ pages = buildFavoritePages(sample["medias"], sample["pageLists"])
+ assert [p.bvid for p in pages] == ["BV1p3ivB8EZA", "BV1PW4y1G7WG"] + ["BV1sx411N7ms"] * 14
+ assert pages[0].cid == 35163146510
+ assert pages[0].episodeTitle == "【中配】为什么Rust教程总喜欢自我吹嘘? Tsoding - Tsoding Highlights"
+ assert [p.pagePart for p in pages[2:5]] == ["至少还有你", "好久不见", "隐形的翅膀"]
+ assert all(p.selected for p in pages)
+
+
def test_parse_space_list_link():
biliUrl = parseBiliUrl(
"https://space.bilibili.com/1992978115/lists/4831253?type=season"
diff --git a/tests/samples/bilibili_favorite.json b/tests/samples/bilibili_favorite.json
new file mode 100644
index 00000000..cd0109af
--- /dev/null
+++ b/tests/samples/bilibili_favorite.json
@@ -0,0 +1,422 @@
+{
+ "medias": [
+ {
+ "id": 115830553774168,
+ "type": 2,
+ "title": "【中配】为什么Rust教程总喜欢自我吹嘘? Tsoding - Tsoding Highlights",
+ "cover": "http://i0.hdslb.com/bfs/archive/8006ff87860c8ed641c8b845c2088ccad0c8d795.png",
+ "intro": "原视频:Why Rust Tutorials Do This Every Time? - Tsoding\n原作者:Tsoding Highlights\n发布日期:2024-07-01\n视频链接:https://www.youtube.com/watch?v=TB2wqzGSsqM\n\n✨ 想看英文原声?请关注 @英文白斑马\n\n00:00 Rust教程中的推销现象\n探讨了Rust教程中普遍存在的不仅传授知识,还不断向观众“推销”该语言优秀的现象。\n\n00:47 语言推销与开发者心态\n作者调侃称Rust必须通过",
+ "page": 1,
+ "duration": 126,
+ "upper": {
+ "mid": 1263732318,
+ "name": "黑纹白斑马",
+ "face": "https://i0.hdslb.com/bfs/face/2b14d2ad8fb6e1c70d927dcc713a8f047e3da8f8.jpg",
+ "jump_link": ""
+ },
+ "attr": 0,
+ "cnt_info": {
+ "collect": 196,
+ "play": 31925,
+ "danmaku": 28,
+ "vt": 0,
+ "play_switch": 0,
+ "reply": 0,
+ "view_text_1": "3.2万"
+ },
+ "link": "bilibili://video/115830553774168",
+ "ctime": 1767434173,
+ "pubtime": 1767434172,
+ "fav_time": 1793025411,
+ "bv_id": "BV1p3ivB8EZA",
+ "bvid": "BV1p3ivB8EZA",
+ "season": null,
+ "ogv": null,
+ "ugc": {
+ "first_cid": 35163146510
+ },
+ "media_list_link": "bilibili://music/playlist/playpage/915343411?page_type=3&oid=115830553774168&otype=2"
+ },
+ {
+ "id": 117349764040689,
+ "type": 2,
+ "title": "已失效视频",
+ "cover": "http://i0.hdslb.com/bfs/archive/be27fd62c99036dce67efface486fb0a88ffed06.jpg",
+ "intro": "为什么悠哥会成为奥木染镇最抢手的男生?",
+ "page": 1,
+ "duration": 458,
+ "upper": {
+ "mid": 3546816893159639,
+ "name": "千玺动漫社",
+ "face": "https://i2.hdslb.com/bfs/face/e1d4363381ad55acdce889d6d1ef259951a86b7d.jpg",
+ "jump_link": ""
+ },
+ "attr": 9,
+ "cnt_info": {
+ "collect": 6628,
+ "play": 266469,
+ "danmaku": 259,
+ "vt": 0,
+ "play_switch": 0,
+ "reply": 0,
+ "view_text_1": "26.6万"
+ },
+ "link": "bilibili://video/117349764040689",
+ "ctime": 1790615627,
+ "pubtime": 1790815860,
+ "fav_time": 1791091286,
+ "bv_id": "BV1BpaL6sEFd",
+ "bvid": "BV1BpaL6sEFd",
+ "season": null,
+ "ogv": null,
+ "ugc": {
+ "first_cid": 42278325507
+ },
+ "media_list_link": "bilibili://music/playlist/playpage/915343411?page_type=3&oid=117349764040689&otype=2"
+ },
+ {
+ "id": 2508242,
+ "type": 24,
+ "title": "永生",
+ "cover": "http://i0.hdslb.com/bfs/archive/5a3942ff93b1cf7f77f77a9502f3d0fe680e3683.png",
+ "intro": "第70话 太元仙府14真传对决",
+ "page": 0,
+ "duration": 1438,
+ "upper": {
+ "mid": 0,
+ "name": "",
+ "face": "",
+ "jump_link": ""
+ },
+ "attr": 0,
+ "cnt_info": {
+ "collect": 0,
+ "play": 0,
+ "danmaku": 0,
+ "vt": 0,
+ "play_switch": 0,
+ "reply": 0,
+ "view_text_1": ""
+ },
+ "link": "https://www.bilibili.com/bangumi/play/ep2508242",
+ "ctime": 0,
+ "pubtime": 1772798401,
+ "fav_time": 1773287483,
+ "bv_id": "BV1tKPWz3EDD",
+ "bvid": "BV1tKPWz3EDD",
+ "season": null,
+ "ogv": {
+ "type_name": "国创",
+ "type_id": 4,
+ "season_id": 35213
+ },
+ "ugc": null,
+ "media_list_link": "bilibili://music/playlist/playpage/915343411?page_type=3&oid=2508242&otype=24"
+ },
+ {
+ "id": 947859289,
+ "type": 2,
+ "title": "【希言塔罗】男性向·2023年第一个向你表白的人会是谁?她会怎样表白?你们会如何发展?",
+ "cover": "http://i1.hdslb.com/bfs/archive/3c9f4b30753896b5a7f3f9a61a88bf812f205eb7.jpg",
+ "intro": "【希言塔罗】男性向·2023年第一个向你表白的人会是谁?她会怎样表白?你们会如何发展?",
+ "page": 4,
+ "duration": 959,
+ "upper": {
+ "mid": 501334739,
+ "name": "希言塔罗",
+ "face": "https://i2.hdslb.com/bfs/face/1b8537dc77480f86902c12ee0918f34906b9295f.jpg",
+ "jump_link": ""
+ },
+ "attr": 16,
+ "cnt_info": {
+ "collect": 4615,
+ "play": 179976,
+ "danmaku": 2731,
+ "vt": 0,
+ "play_switch": 0,
+ "reply": 0,
+ "view_text_1": "18万"
+ },
+ "link": "bilibili://video/947859289",
+ "ctime": 1673604215,
+ "pubtime": 1673604664,
+ "fav_time": 1674617593,
+ "bv_id": "BV1PW4y1G7WG",
+ "bvid": "BV1PW4y1G7WG",
+ "season": null,
+ "ogv": null,
+ "ugc": {
+ "first_cid": 964122406
+ },
+ "media_list_link": "bilibili://music/playlist/playpage/915343411?page_type=3&oid=947859289&otype=2"
+ },
+ {
+ "id": 1336551,
+ "type": 2,
+ "title": "小学生个人演唱会,我是跪着听完的",
+ "cover": "http://i1.hdslb.com/bfs/archive/94a2dbc70301fa789f53517e41c4e090701e7733.jpg",
+ "intro": "优酷 唱功简直碉堡,各种秒杀原唱,小宝贝还是洗洗睡把\n",
+ "page": 14,
+ "duration": 3620,
+ "upper": {
+ "mid": 1318943,
+ "name": "令和男儿",
+ "face": "https://i2.hdslb.com/bfs/face/09b380297208be29c621128f0c52141002d96244.jpg",
+ "jump_link": ""
+ },
+ "attr": 0,
+ "cnt_info": {
+ "collect": 140858,
+ "play": 8614343,
+ "danmaku": 167571,
+ "vt": 0,
+ "play_switch": 0,
+ "reply": 0,
+ "view_text_1": "861.4万"
+ },
+ "link": "bilibili://video/1336551",
+ "ctime": 1497425505,
+ "pubtime": 1406447053,
+ "fav_time": 1791816083,
+ "bv_id": "BV1sx411N7ms",
+ "bvid": "BV1sx411N7ms",
+ "season": null,
+ "ogv": null,
+ "ugc": {
+ "first_cid": 2026688
+ },
+ "media_list_link": "bilibili://music/playlist/playpage/915343411?page_type=3&oid=1336551&otype=2"
+ }
+ ],
+ "pageLists": {
+ "BV1PW4y1G7WG": [
+ {
+ "cid": 964122406,
+ "page": 1,
+ "from": "vupload",
+ "part": "lv_0_20230113121334",
+ "duration": 63,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 1920,
+ "height": 1080,
+ "rotate": 0
+ },
+ "ctime": 0
+ }
+ ],
+ "BV1sx411N7ms": [
+ {
+ "cid": 2026688,
+ "page": 1,
+ "from": "vupload",
+ "part": "至少还有你",
+ "duration": 279,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2026689,
+ "page": 2,
+ "from": "vupload",
+ "part": "好久不见",
+ "duration": 244,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2026690,
+ "page": 3,
+ "from": "vupload",
+ "part": "隐形的翅膀",
+ "duration": 221,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2036508,
+ "page": 4,
+ "from": "vupload",
+ "part": "你那么爱她",
+ "duration": 251,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2036509,
+ "page": 5,
+ "from": "vupload",
+ "part": "传奇[王菲哭晕厕所",
+ "duration": 292,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2036915,
+ "page": 6,
+ "from": "vupload",
+ "part": "最熟悉的陌生人",
+ "duration": 258,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2036916,
+ "page": 7,
+ "from": "vupload",
+ "part": "珊瑚海",
+ "duration": 251,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043554,
+ "page": 8,
+ "from": "vupload",
+ "part": "新贵妃醉酒",
+ "duration": 279,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043555,
+ "page": 9,
+ "from": "vupload",
+ "part": "青春纪念册[基友登场",
+ "duration": 307,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043906,
+ "page": 10,
+ "from": "vupload",
+ "part": "背对背拥抱",
+ "duration": 240,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043907,
+ "page": 11,
+ "from": "vupload",
+ "part": "小酒窝",
+ "duration": 240,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043908,
+ "page": 12,
+ "from": "vupload",
+ "part": "青花瓷",
+ "duration": 240,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043909,
+ "page": 13,
+ "from": "vupload",
+ "part": "彩虹",
+ "duration": 268,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 320,
+ "height": 240,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ },
+ {
+ "cid": 2043905,
+ "page": 14,
+ "from": "vupload",
+ "part": "时间都去哪儿啦",
+ "duration": 250,
+ "vid": "",
+ "weblink": "",
+ "dimension": {
+ "width": 640,
+ "height": 360,
+ "rotate": 0
+ },
+ "ctime": 1497425505
+ }
+ ]
+ }
+}
\ No newline at end of file