UI/UX: Adiciona campo opcional para colagem manual de transcrição no VideoMind
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const axios = require('axios');
|
||||
async function test() {
|
||||
try {
|
||||
const res = await axios.get('https://api.allorigins.win/raw?url=' + encodeURIComponent('https://www.youtube.com/watch?v=0g7qSGQIoxw'));
|
||||
const html = res.data;
|
||||
const match = html.match(/"captionTracks":(\[.*?\])/);
|
||||
if (match) {
|
||||
console.log("ACHOU CAPTIONS!");
|
||||
console.log(match[1].substring(0, 500));
|
||||
} else {
|
||||
console.log("NÃO ACHOU CAPTIONS NO HTML PROXY");
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Erro no proxy:", err.message);
|
||||
}
|
||||
}
|
||||
test();
|
||||
Reference in New Issue
Block a user