mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 07:41:02 +08:00
Got the news id system working. Oh wait, this should be in the tab system...
This commit is contained in:
parent
ce1d150c11
commit
1dd324e0ca
@ -10,6 +10,8 @@ Reverse engineering documentation: [about](/about/)
|
|||||||
## Before deploying, please know this:
|
## Before deploying, please know this:
|
||||||
This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so.
|
This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so.
|
||||||
|
|
||||||
|
## Note for developing.
|
||||||
|
The desktop enviroment is super unstable when even using a beefy computer, even so, the desktop will lag when opening the newsView, like it's just hates being in a dev env. Prod app works tho, so you can demo it using `bun run build && bun run preview` for demoing. Please don't file a issue request for this matter. If you have the fix, please contribute using Github PRs.
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
|
@ -89,8 +89,12 @@ async function lineToday(slug: string) {
|
|||||||
if (publishMatch) {
|
if (publishMatch) {
|
||||||
publishedAt = findTime(publishMatch[1].trim());
|
publishedAt = findTime(publishMatch[1].trim());
|
||||||
}
|
}
|
||||||
const getAuthorUrl = html("entityPublishInfo-avatarLin").html();
|
|
||||||
console.log(getAuthorUrl);
|
const findPublisherUrl = html("a.entityPublishInfo-avatarLink").attr("href") || "";
|
||||||
|
const publisherIdMatch = findPublisherUrl.match(/[0-9]{6}/);
|
||||||
|
const publisherId = publisherIdMatch ? publisherIdMatch[0] : "";
|
||||||
|
console.log(publisherId);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
paragraph: paragraph,
|
paragraph: paragraph,
|
||||||
@ -99,7 +103,8 @@ async function lineToday(slug: string) {
|
|||||||
images: images,
|
images: images,
|
||||||
updateat: updatedAt,
|
updateat: updatedAt,
|
||||||
publishedat: publishedAt,
|
publishedat: publishedAt,
|
||||||
};
|
publisherId: publisherId
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default lineToday;
|
export default lineToday;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user