Fix error message extraction and missing chapters
This commit is contained in:
parent
ffee49b9fb
commit
e17fbc68e4
@ -189,7 +189,8 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
|
|||||||
throw new Error(
|
throw new Error(
|
||||||
`While getting info from url\n${
|
`While getting info from url\n${
|
||||||
player_response.playabilityStatus.errorScreen.playerErrorMessageRenderer?.reason.simpleText ??
|
player_response.playabilityStatus.errorScreen.playerErrorMessageRenderer?.reason.simpleText ??
|
||||||
player_response.playabilityStatus.errorScreen.playerKavRenderer?.reason.simpleText
|
player_response.playabilityStatus.errorScreen.playerKavRenderer?.reason.simpleText ??
|
||||||
|
player_response.playabilityStatus.reason
|
||||||
}`
|
}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -231,7 +232,7 @@ export async function video_basic_info(url: string, options: InfoOptions = {}):
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
const rawChapters =
|
const rawChapters =
|
||||||
initial_response.playerOverlays.playerOverlayRenderer.decoratedPlayerBarRenderer.decoratedPlayerBarRenderer.playerBar?.multiMarkersPlayerBarRenderer.markersMap.find(
|
initial_response.playerOverlays.playerOverlayRenderer.decoratedPlayerBarRenderer?.decoratedPlayerBarRenderer.playerBar?.multiMarkersPlayerBarRenderer.markersMap.find(
|
||||||
(m: any) => m.key === 'DESCRIPTION_CHAPTERS'
|
(m: any) => m.key === 'DESCRIPTION_CHAPTERS'
|
||||||
)?.value?.chapters;
|
)?.value?.chapters;
|
||||||
const chapters: VideoChapter[] = [];
|
const chapters: VideoChapter[] = [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user