mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-13 08:39:38 +08:00
fix: Github trending (#2380)
This commit is contained in:
@@ -17,7 +17,7 @@ module.exports = async (ctx) => {
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.repo-list li');
|
||||
const list = $('article');
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('title').text(),
|
||||
@@ -28,8 +28,8 @@ module.exports = async (ctx) => {
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('h3').text(),
|
||||
description: `${item.find('.py-1').text()}<br>
|
||||
title: item.find('h1').text(),
|
||||
description: `${item.find('.pr-4').text()}<br>
|
||||
<br>Language: ${item.find('span[itemprop="programmingLanguage"]').text() || 'unknown'}
|
||||
<br>Star: ${item
|
||||
.find('.muted-link')
|
||||
@@ -39,7 +39,7 @@ module.exports = async (ctx) => {
|
||||
.find('.muted-link')
|
||||
.eq(1)
|
||||
.text()}`,
|
||||
link: `https://github.com${item.find('h3 a').attr('href')}`,
|
||||
link: `https://github.com${item.find('h1 a').attr('href')}`,
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
||||
Reference in New Issue
Block a user