mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Update settings page w/ deleting your account. and update translations.
This commit is contained in:
parent
3ebaff5218
commit
45397675f5
6 changed files with 147 additions and 33 deletions
|
@ -30,23 +30,24 @@ export default defineEventHandler(async (event) => {
|
|||
"";
|
||||
const bgImage = html("figure.keyVisual img").attr("srcset") || "";
|
||||
const articles = [];
|
||||
const regexArticleLinks = /[a-zA-Z0-9]{7}/g
|
||||
const regexArticleLinks = /[a-zA-Z0-9]{7}/g;
|
||||
const otherArticles = <any[]>[];
|
||||
html("a.ltcp-link")
|
||||
.each((i, element) => {
|
||||
const articleLink = html(element).attr("href");
|
||||
const articleTitle = html(element).find("h3.header").text();
|
||||
const date = html(element).find("div._articleCard div.css-wqleh6 span").text();
|
||||
if (articleLink && articleTitle) {
|
||||
const articleSlug = articleLink.matchAll(regexArticleLinks);
|
||||
otherArticles.push({
|
||||
index: i,
|
||||
title: articleTitle,
|
||||
link: articleSlug,
|
||||
date: date,
|
||||
});
|
||||
}
|
||||
});
|
||||
html("a.ltcp-link").each((i, element) => {
|
||||
const articleLink = html(element).attr("href");
|
||||
const articleTitle = html(element).find("h3.header").text();
|
||||
const date = html(element)
|
||||
.find("div._articleCard div.css-wqleh6 span")
|
||||
.text();
|
||||
if (articleLink && articleTitle) {
|
||||
const articleSlug = articleLink.matchAll(regexArticleLinks);
|
||||
otherArticles.push({
|
||||
index: i,
|
||||
title: articleTitle,
|
||||
link: articleSlug,
|
||||
date: date,
|
||||
});
|
||||
}
|
||||
});
|
||||
return {
|
||||
name: newsOrgName,
|
||||
description: description,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue