fix nullable chapters
This commit is contained in:
parent
d79346cfbe
commit
ad63ec2847
@ -232,7 +232,7 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
|
||||
const rawChapters =
|
||||
initial_response.playerOverlays.playerOverlayRenderer.decoratedPlayerBarRenderer.decoratedPlayerBarRenderer.playerBar?.multiMarkersPlayerBarRenderer.markersMap.find(
|
||||
(m: any) => m.key === 'DESCRIPTION_CHAPTERS'
|
||||
).value.chapters;
|
||||
)?.value?.chapters;
|
||||
const chapters: VideoChapter[] = [];
|
||||
if (rawChapters) {
|
||||
for (const { chapterRenderer } of rawChapters) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user