diff --git a/lib/v2/pianyuan/search.js b/lib/v2/pianyuan/search.js index fba635dff..09b060dce 100644 --- a/lib/v2/pianyuan/search.js +++ b/lib/v2/pianyuan/search.js @@ -22,7 +22,7 @@ module.exports = async (ctx) => { await Promise.all( searchLinks.map(async (e) => { - const link = new URL(e, link_base); + const link = new URL(e, link_base).href; const single = await ctx.cache.tryGet(link, async () => { const res = await utils.request(link, ctx.cache); const content = cheerio.load(res.data); diff --git a/lib/v2/pianyuan/utils.js b/lib/v2/pianyuan/utils.js index 0eaaf9ce5..408634819 100644 --- a/lib/v2/pianyuan/utils.js +++ b/lib/v2/pianyuan/utils.js @@ -10,7 +10,7 @@ const ProcessFeed = async (list, cache) => { const items = await Promise.all( list.map(async (e) => { - const link = new URL(e, link_base); + const link = new URL(e, link_base).href; const single = await cache.tryGet(link, async () => { const response = await request(link, cache); const content = cheerio.load(response.data);