Skip to content

Commit

Permalink
fix(route): github trending css selector changed (DIYgod#7279)
Browse files Browse the repository at this point in the history
  • Loading branch information
queensferryme authored May 25, 2021
1 parent 39db632 commit ec35396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/routes/github/trending.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')}`,
};
})
Expand Down

0 comments on commit ec35396

Please sign in to comment.