fix(route): github trending css selector changed (#7279)
This commit is contained in:
@@ -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()}<br>
|
||||
<br>Language: ${item.find('span[itemprop="programmingLanguage"]').text() || 'unknown'}
|
||||
<br>Star: ${item.find('.muted-link').eq(0).text()}
|
||||
<br>Fork: ${item.find('.muted-link').eq(1).text()}`,
|
||||
<br>Star: ${item.find('.Link--muted').eq(0).text().trim()}
|
||||
<br>Fork: ${item.find('.Link--muted').eq(1).text().trim()}`,
|
||||
link: `https://github.com${item.find('h1 a').attr('href')}`,
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user