style: auto format
This commit is contained in:
@@ -11,9 +11,7 @@ module.exports = async (ctx) => {
|
||||
const category = ctx.params.category ? ctx.params.category.toLowerCase() : '';
|
||||
const rssUrl = `https://${region ? `${region}.` : ''}news.yahoo.com/rss/${category}`;
|
||||
const feed = await parser.parseURL(rssUrl);
|
||||
const filteredItems = feed.items.filter(
|
||||
(item) => !item.link.includes('promotions') && new URL(item.link).hostname.match(/.*\.yahoo\.com$/)
|
||||
);
|
||||
const filteredItems = feed.items.filter((item) => !item.link.includes('promotions') && new URL(item.link).hostname.match(/.*\.yahoo\.com$/));
|
||||
const items = await Promise.all(
|
||||
filteredItems.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
|
||||
Reference in New Issue
Block a user