getTitle = async (url) => {
try {
const response = await fetch(`https://corsproxy.io/?` + url);
const html = await response.text();
const parser = new DOMParser();
const doc = parser.parseFromString(html, "text/xml");
const title = doc.getElementsByTagName("title")[0];
return title.textContent;
} catch (error) {
console.error("Erreur lors de la récupération des podcasts :", error);
return [];
}
}