From ec35396bf1fd3e59aba65008f30d27fe5a5af520 Mon Sep 17 00:00:00 2001 From: Queensferry Date: Tue, 25 May 2021 21:16:53 +0800 Subject: [PATCH] fix(route): github trending css selector changed (#7279) --- lib/routes/github/trending.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/github/trending.js b/lib/routes/github/trending.js index a2518e2302f859..30f5eaa2dd4313 100644 --- a/lib/routes/github/trending.js +++ b/lib/routes/github/trending.js @@ -25,15 +25,15 @@ module.exports = async (ctx) => { item: list && list - .map((index, item) => { + .map((_, item) => { item = $(item); return { title: item.find('h1').text(), author: item.find('h1').text().split('/')[0].trim(), description: `${item.find('.pr-4').text()}

Language: ${item.find('span[itemprop="programmingLanguage"]').text() || 'unknown'} -
Star: ${item.find('.muted-link').eq(0).text()} -
Fork: ${item.find('.muted-link').eq(1).text()}`, +
Star: ${item.find('.Link--muted').eq(0).text().trim()} +
Fork: ${item.find('.Link--muted').eq(1).text().trim()}`, link: `https://github.com${item.find('h1 a').attr('href')}`, }; })