export async function getLatestVideo(): Promise<string> { | |
const res = await fetch('https://www.youtube.com/@Lucinda-0101'); | |
if (!res.ok) throw new Error('Failed to fetch'); | |
const text = await res.text(); | |
const match = text.match(/https:\/\/i\.ytimg\.com\/vi\/(\S+?)\//); | |
if (!match) throw new Error('Failed to match'); | |
return match[1]; | |
} | |