mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -4,20 +4,20 @@ const cheerio = require('cheerio');
|
||||
module.exports = async (ctx) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: 'http://www.a9vg.com/news/',
|
||||
url: 'http://www.a9vg.com/list/news',
|
||||
headers: {
|
||||
Referer: 'http://www.a9vg.com/news/',
|
||||
Referer: 'http://www.a9vg.com/list/news',
|
||||
},
|
||||
});
|
||||
|
||||
const data = response.data;
|
||||
|
||||
const $ = cheerio.load(data);
|
||||
const list = $('.txt-r-img.combine2 dl');
|
||||
const list = $('.a9-rich-card-list li');
|
||||
|
||||
ctx.state.data = {
|
||||
title: 'A9VG电玩部落',
|
||||
link: 'http://www.a9vg.com/news/',
|
||||
link: 'http://www.a9vg.com/list/news/',
|
||||
description: '电玩资讯_电玩动态- A9VG电玩部落',
|
||||
item:
|
||||
list &&
|
||||
@@ -25,10 +25,10 @@ module.exports = async (ctx) => {
|
||||
.map((index, item) => {
|
||||
item = $(item);
|
||||
return {
|
||||
title: item.find('.img-scale').attr('title'),
|
||||
description: item.find('p').text() + '<img referrerpolicy="no-referrer" src="' + item.find('img').attr('src') + '">',
|
||||
pubDate: new Date(item.find('.time').text()).toUTCString(),
|
||||
link: item.find('.img-scale').attr('href'),
|
||||
title: item.find('.a9-rich-card-list_label').text(),
|
||||
description: item.find('.a9-rich-card-list_summary').text() + '<img src="' + item.find('img').attr('src') + '">',
|
||||
pubDate: new Date(item.find('.a9-rich-card-list_infos').text()).toUTCString(),
|
||||
link: 'http://www.a9vg.com' + item.find('.a9-rich-card-list_item').attr('href'),
|
||||
};
|
||||
})
|
||||
.get(),
|
||||
|
||||
Reference in New Issue
Block a user