From 9af421ae2fc933b4155ef10750f2bb4ec4c53357 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 14:46:15 +0000 Subject: [PATCH] style: auto format --- lib/routes/95mm/utils.ts | 2 +- lib/routes/abc/index.ts | 2 +- lib/routes/bloomberg/utils.ts | 4 ++-- lib/routes/dedao/list.ts | 2 +- lib/routes/digitalcameraworld/news.ts | 2 +- lib/routes/dlsite/utils.ts | 2 +- lib/routes/domp4/detail.ts | 2 +- lib/routes/domp4/utils.ts | 4 ++-- lib/routes/gamebase/news.ts | 4 ++-- lib/routes/gov/mee/ywdt.ts | 4 ++-- lib/routes/harvard/health/blog.ts | 2 +- lib/routes/layoffs/index.ts | 2 +- lib/routes/luolei/index.ts | 2 +- lib/routes/lxixsxa/jsonp-helper.ts | 2 +- lib/routes/metacritic/index.ts | 2 +- lib/routes/nikkei/cn/index.ts | 2 +- lib/routes/odaily/activity.ts | 2 +- lib/routes/odaily/user.ts | 2 +- lib/routes/openai/common.ts | 2 +- lib/routes/radio-canada/latest.ts | 2 +- lib/routes/readhub/util.ts | 2 +- lib/routes/science/blogs.ts | 4 ++-- lib/routes/scmp/index.ts | 4 ++-- lib/routes/supchina/index.ts | 2 +- lib/routes/supchina/podcasts.ts | 6 +++--- lib/routes/tribalfootball/latest.ts | 2 +- lib/routes/wikinews/index.ts | 6 +++--- lib/routes/yoasobi-music/jsonp-helper.ts | 2 +- lib/utils/wechat-mp.ts | 10 +++++----- 29 files changed, 43 insertions(+), 43 deletions(-) diff --git a/lib/routes/95mm/utils.ts b/lib/routes/95mm/utils.ts index ae0de6936..b374ad0a3 100644 --- a/lib/routes/95mm/utils.ts +++ b/lib/routes/95mm/utils.ts @@ -45,7 +45,7 @@ const ProcessItems = async (ctx, title, currentUrl) => { const images = detailResponse.data.match(/src": '(.*?)',"width/g); item.description = art(path.join(__dirname, 'templates/description.art'), { - images: images.map((i) => i.split("'")[1].replaceAll('\\/', '/')), + images: images.map((i) => i.split("'")[1].replaceAll(String.raw`\/`, '/')), }); return item; diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index bd3075455..4dd9d046b 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -126,7 +126,7 @@ async function handler(ctx) { item.title = content('meta[property="og:title"]').prop('content'); item.description = ''; - const enclosurePattern = '"(?:MIME|content)?Type":"([\\w]+/[\\w]+)".*?"(?:fileS|s)?ize":(\\d+),.*?"url":"([\\w-.:/?]+)"'; + const enclosurePattern = String.raw`"(?:MIME|content)?Type":"([\w]+/[\w]+)".*?"(?:fileS|s)?ize":(\d+),.*?"url":"([\w-.:/?]+)"`; const enclosureMatches = detailResponse.match(new RegExp(enclosurePattern, 'g')); diff --git a/lib/routes/bloomberg/utils.ts b/lib/routes/bloomberg/utils.ts index 6a0ef7cd4..92daa603c 100644 --- a/lib/routes/bloomberg/utils.ts +++ b/lib/routes/bloomberg/utils.ts @@ -85,9 +85,9 @@ const parseNewsList = async (url, ctx) => { .map((u) => { u = $(u); const item = { - title: u.find('news\\:title').text(), + title: u.find(String.raw`news\:title`).text(), link: u.find('loc').text(), - pubDate: parseDate(u.find('news\\:publication_date').text()), + pubDate: parseDate(u.find(String.raw`news\:publication_date`).text()), }; return item; }); diff --git a/lib/routes/dedao/list.ts b/lib/routes/dedao/list.ts index 182608a90..28e11dd69 100644 --- a/lib/routes/dedao/list.ts +++ b/lib/routes/dedao/list.ts @@ -44,7 +44,7 @@ async function handler(ctx) { url: listUrl, }); - const currentUrl = `${rootUrl}${listResponse.data.match(new RegExp('' + category + '<\\/span>