From 9d486c3bda61192852544de49d8a53ad1bd95187 Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 20 Jul 2026 01:09:29 +0800 Subject: [PATCH] fix(route/picnob): fix image and video selector (#22757) --- lib/routes/picnob/user.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index 98c621713..80525a864 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -67,13 +67,18 @@ async function handler(ctx) { const coverLink = $item.find('.cover_link').attr('href'); const image = $item.find('.cover .cover_link img'); const alt = image.attr('alt') || ''; + const downloadUrl = new URL($item.find('.downbtn').attr('href')!, baseUrl); + downloadUrl.searchParams.delete('dl'); + const fullImage = new URL(image.attr('data-src')!); + fullImage.searchParams.set('o', Buffer.from(downloadUrl.href).toString('base64')); const sum = $item.find('.sum'); const title = sum.text().split('\n', 1)[0] || alt; const content = sum.html()?.replaceAll('\n', '
') || alt; + const isVideo = $item.find('.corner .icon_video, .corner .icon_tv').length; return { title, - description: `
${content}`, + description: `
${content}`, link: `${baseUrl}${coverLink}`, guid: coverLink?.split('/', 3)?.[2], pubDate: parseRelativeDate($item.find('.time .txt').text()), @@ -114,7 +119,7 @@ async function handler(ctx) { return $item.html() || ''; }) .join('') - : $('.view .video').html() || ''; + : $('.view video').prop('outerHTML') || ''; item.description = `${media}
${item.description}`; }