mirror of
https://github.com/snobu/destreamer.git
synced 2026-02-19 12:59:43 +00:00
Fix for double quotes in video title https://github.com/snobu/destreamer/issues/11
This commit is contained in:
@@ -90,12 +90,15 @@ async function rentVideoForLater(videoUrls: string[], username: string, outputDi
|
|||||||
() => { return amp.Player.players["vjs_video_3"].cache_.src }
|
() => { return amp.Player.players["vjs_video_3"].cache_.src }
|
||||||
);
|
);
|
||||||
|
|
||||||
const title = await page.evaluate(
|
let title = await page.evaluate(
|
||||||
// Clear abuse of null assertion operator,
|
// Clear abuse of null assertion operator,
|
||||||
// someone fix this please
|
// someone fix this please
|
||||||
() => { return document!.querySelector(".title")!.textContent!.trim() }
|
() => { return document!.querySelector(".title")!.textContent!.trim() }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Sanitize title
|
||||||
|
title = title.replace(/"/g, '');
|
||||||
|
|
||||||
console.log(`Video title is: ${title}`);
|
console.log(`Video title is: ${title}`);
|
||||||
|
|
||||||
console.log('Constructing HLS URL...');
|
console.log('Constructing HLS URL...');
|
||||||
|
|||||||
Reference in New Issue
Block a user