From c33c9b1762e4caf0ce55db4e163b49deb0931bc4 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 30 Oct 2025 04:56:32 +0800 Subject: [PATCH] fix(route): add youtube referer (#20396) --- lib/routes/aeon/templates/video.art | 2 +- lib/routes/apnews/templates/description.art | 2 +- lib/routes/cfr/utils.ts | 2 +- lib/routes/esquirehk/templates/subpages.art | 2 +- lib/routes/fanbox/utils.ts | 2 +- lib/routes/meteor/templates/desc.art | 2 +- lib/routes/pikabu/templates/video.art | 2 +- lib/routes/producthunt/templates/description.art | 2 +- lib/routes/psyche/templates/video.art | 2 +- lib/routes/steam/news.ts | 1 + lib/routes/sustainabilitymag/articles.ts | 2 +- lib/routes/twreporter/templates/youtube.art | 2 +- lib/routes/xys/templates/desc.art | 2 +- lib/routes/yahoo/templates/youtube.art | 2 +- lib/routes/youtube/templates/description.art | 2 +- lib/routes/zuvio/templates/youtube.art | 2 +- 16 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/routes/aeon/templates/video.art b/lib/routes/aeon/templates/video.art index c3d673561..b16cf33d5 100644 --- a/lib/routes/aeon/templates/video.art +++ b/lib/routes/aeon/templates/video.art @@ -5,6 +5,6 @@ {{ set video = "https://www.youtube-nocookie.com/embed/" + video }} {{ /if }} - + {{@ article.credits }} {{@ article.description }} diff --git a/lib/routes/apnews/templates/description.art b/lib/routes/apnews/templates/description.art index 5db884560..aa54abacb 100644 --- a/lib/routes/apnews/templates/description.art +++ b/lib/routes/apnews/templates/description.art @@ -6,7 +6,7 @@
{{@ $value.caption }}
{{ else if $value.type === 'YouTube' }} - + {{ if $value.caption }}{{@ $value.caption }}{{ /if }} {{ /if }} {{ /each }} diff --git a/lib/routes/cfr/utils.ts b/lib/routes/cfr/utils.ts index 2c23064c1..56f6ba9cc 100644 --- a/lib/routes/cfr/utils.ts +++ b/lib/routes/cfr/utils.ts @@ -247,7 +247,7 @@ function getVideoIframe($ele: Cheerio) { if (youtubeSource) { const videoId = youtubeSource.src.match(/\?v=([^&]+)/)?.[1]; if (videoId) { - return ``; + return ``; } } } diff --git a/lib/routes/esquirehk/templates/subpages.art b/lib/routes/esquirehk/templates/subpages.art index ee55c570f..ae2a5cf5b 100644 --- a/lib/routes/esquirehk/templates/subpages.art +++ b/lib/routes/esquirehk/templates/subpages.art @@ -5,7 +5,7 @@ {{ image.alt }} {{ else if page.type === 'video_block' }} - + {{ else if page.type === 'ctc_product_list' }} {{ each page.products product }} diff --git a/lib/routes/fanbox/utils.ts b/lib/routes/fanbox/utils.ts index 846a700fe..5600b11c2 100644 --- a/lib/routes/fanbox/utils.ts +++ b/lib/routes/fanbox/utils.ts @@ -84,7 +84,7 @@ async function parseVideo(body: VideoPost['body']) { ret += await getSoundCloudEmbedUrl(body.video.videoId); break; case 'youtube': - ret += ``; + ret += ``; break; case 'vimeo': ret += ``; diff --git a/lib/routes/meteor/templates/desc.art b/lib/routes/meteor/templates/desc.art index 9639bc1c1..96c2464f3 100644 --- a/lib/routes/meteor/templates/desc.art +++ b/lib/routes/meteor/templates/desc.art @@ -1,5 +1,5 @@ {{ if youTube }} - + {{ else if img }} {{ else if video }} diff --git a/lib/routes/pikabu/templates/video.art b/lib/routes/pikabu/templates/video.art index 09b5faa18..291266421 100644 --- a/lib/routes/pikabu/templates/video.art +++ b/lib/routes/pikabu/templates/video.art @@ -1,5 +1,5 @@ {{ if videoId }} - + {{ else if webm || mp4 }}