mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(route): item links in zhubai top20 (#15823)
* fix(route): item links in zhubai top20 * fix(route): matcher in zhubai top20 --------- Co-authored-by: Jia-Jun, Yeh <xnumtw@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ async function handler(ctx) {
|
||||
|
||||
let items = response.data.slice(0, limit).map((item) => ({
|
||||
title: item.pn,
|
||||
link: item.fp ?? item.pq ?? item.pu,
|
||||
link: item.pu ?? item.pq ?? item.fp,
|
||||
description: item.pa,
|
||||
author: item.zn,
|
||||
pubDate: parseRelativeDate(item.lu.replace(/\.\d+/, '')),
|
||||
@@ -60,7 +60,7 @@ async function handler(ctx) {
|
||||
items = await Promise.all(
|
||||
items.map((item) =>
|
||||
cache.tryGet(item.link, async () => {
|
||||
const matches = item.link.match(/\/(?:fp|pq|pu)\/([\w-]+)\/(\d+)/);
|
||||
const matches = item.link.match(/\/(?:pl|pq|fp)\/([\w-]+)\/(\d+)/);
|
||||
|
||||
const { data } = await got(`https://${matches[1]}.zhubai.love/api/posts/${matches[2]}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user