Skip to content

Commit

Permalink
improve stability
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-stone committed Oct 14, 2024
1 parent 1a5b3c5 commit c67165d
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/app/read/[articleUrl]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,7 @@ const ArticlePage = async ({ params }) => {
ttr = article.ttr;
image = article.image;
} else {
const response = await fetch(decodedUrl);
const html = await response.text();
const dom = new JSDOM(html);
const document = dom.window.document;

const ogTitle = document.querySelector('meta[property="og:title"]');
if (ogTitle) {
title = ogTitle.getAttribute("content");
} else {
title = document.querySelector("title")?.textContent || "Video";
}

datePublished = new Date().toISOString();
title = "Video";
}
isLoading = false;
} catch (err) {
Expand Down

0 comments on commit c67165d

Please sign in to comment.