1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-17 05:22:18 +00:00
This commit is contained in:
snobu
2020-03-21 21:36:33 +02:00
parent caf9803e22
commit bf38507535

View File

@@ -90,12 +90,15 @@ async function rentVideoForLater(videoUrls: string[], username: string, outputDi
() => { 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,
// someone fix this please
() => { return document!.querySelector(".title")!.textContent!.trim() }
);
// Sanitize title
title = title.replace(/"/g, '');
console.log(`Video title is: ${title}`);
console.log('Constructing HLS URL...');