mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix: change cache strategy of 色花堂 (#4088)
This commit is contained in:
@@ -97,7 +97,7 @@ module.exports = async (ctx) => {
|
||||
$(images[k]).replaceWith(`<img src="${$(images[k]).attr('file')}" />`);
|
||||
}
|
||||
}
|
||||
const description = (postMessage.html() || '原帖已被删除').replace(/ignore_js_op/g, 'div');
|
||||
const description = (postMessage.html() || '抓取原帖失败').replace(/ignore_js_op/g, 'div');
|
||||
const enclosureUrl = postMessage.find('div.blockcode li').text();
|
||||
|
||||
const single = {
|
||||
@@ -108,7 +108,9 @@ module.exports = async (ctx) => {
|
||||
enclosure_url: enclosureUrl,
|
||||
enclosure_type: 'application/x-bittorrent',
|
||||
};
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
if (description !== '抓取原帖失败') {
|
||||
ctx.cache.set(itemUrl, JSON.stringify(single));
|
||||
}
|
||||
return Promise.resolve(single);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user