mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: 99percentinvisible (#2307)
This commit is contained in:
@@ -10,15 +10,14 @@ module.exports = async (ctx) => {
|
||||
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const list = $('.content .post-blocks .post-actions a.transcript')
|
||||
const list = $('.content .post-blocks a.post-image')
|
||||
.map((i, e) => $(e).attr('href'))
|
||||
.get();
|
||||
|
||||
const out = await Promise.all(
|
||||
list
|
||||
.filter((e) => e.startsWith('/episode'))
|
||||
.filter((e) => e.startsWith(url.resolve(host, 'episode/')))
|
||||
.map(async (itemUrl) => {
|
||||
itemUrl = url.resolve(host, itemUrl);
|
||||
const cache = await ctx.cache.get(itemUrl);
|
||||
if (cache) {
|
||||
return Promise.resolve(JSON.parse(cache));
|
||||
@@ -33,8 +32,8 @@ module.exports = async (ctx) => {
|
||||
.trim(),
|
||||
link: itemUrl,
|
||||
author: '99% Invisible',
|
||||
description: $('article .transcript-content').html(),
|
||||
pubDate: new Date($('article header .entry-meta time').text()),
|
||||
description: $('article .page-content').html(),
|
||||
pubDate: new Date($('article header .entry-meta time').text()).toUTCString(),
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
return Promise.resolve(single);
|
||||
|
||||
Reference in New Issue
Block a user