From ce1d150c1160f600b344bc20d7231598f915b4ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B3=E5=85=83=E7=9A=93?= Date: Sun, 1 Jun 2025 23:45:59 +0800 Subject: [PATCH] Do text-center in copyright in about && add testing data. --- components/app/info/copyright.vue | 2 +- components/app/windows/about.vue | 2 +- server/api/publishers/lt/[slug].ts | 9 +++++++++ server/scrape/line_today.ts | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 server/api/publishers/lt/[slug].ts diff --git a/components/app/info/copyright.vue b/components/app/info/copyright.vue index 0be643f..5316080 100644 --- a/components/app/info/copyright.vue +++ b/components/app/info/copyright.vue @@ -2,7 +2,7 @@ const { t } = useI18n(); diff --git a/server/api/publishers/lt/[slug].ts b/server/api/publishers/lt/[slug].ts new file mode 100644 index 0000000..8a11d4f --- /dev/null +++ b/server/api/publishers/lt/[slug].ts @@ -0,0 +1,9 @@ +import * as cheerio from "cheerio"; + +export default defineEventHandler(async (event) => { + const slug = getRouterParam(event, "slug"); + const buildUrl = "https://today.line.me/tw/v3/publisher/" + slug; + try { + const req = await fetch(buildUrl) + } catch (e) {} +}) \ No newline at end of file diff --git a/server/scrape/line_today.ts b/server/scrape/line_today.ts index c5169cd..81e9ee4 100644 --- a/server/scrape/line_today.ts +++ b/server/scrape/line_today.ts @@ -89,6 +89,8 @@ async function lineToday(slug: string) { if (publishMatch) { publishedAt = findTime(publishMatch[1].trim()); } + const getAuthorUrl = html("entityPublishInfo-avatarLin").html(); + console.log(getAuthorUrl); return { title: title, paragraph: paragraph,