Suporte a URLs de Live e Shorts no VideoMind

This commit is contained in:
2026-06-05 14:09:41 +00:00
parent 945a87b998
commit f1dfd01511
+1 -1
View File
@@ -696,7 +696,7 @@ app.delete('/api/comics/projects/:id', requireAuth, async (req, res) => {
// ROTAS DO VIDEOMIND (TRANSCRIÇÃO E ANÁLISE DE VÍDEO) // ROTAS DO VIDEOMIND (TRANSCRIÇÃO E ANÁLISE DE VÍDEO)
// ============================================================ // ============================================================
function getYouTubeId(url) { function getYouTubeId(url) {
const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; const regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=|live\/|shorts\/)([^#\&\?]*).*/;
const match = url.match(regExp); const match = url.match(regExp);
return (match && match[2].length === 11) ? match[2] : null; return (match && match[2].length === 11) ? match[2] : null;
} }