mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 20:27:52 +08:00
fix: matters item (#3929)
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
const res = await got.get(url);
|
||||
const $ = cheerio.load(res.data);
|
||||
const list = $('li section.container').get();
|
||||
const list = $('section.list-item').get();
|
||||
|
||||
const proList = [];
|
||||
const indexList = [];
|
||||
@@ -16,10 +16,8 @@ module.exports = async (ctx) => {
|
||||
const $ = cheerio.load(item);
|
||||
const time = $('time').attr('datetime');
|
||||
const title = $('h2').text();
|
||||
const author = $('div.content a')
|
||||
.attr('href')
|
||||
.replace(/\/@(.*?)\/.*/, '$1');
|
||||
const postfix = encodeURI($('div.content a').attr('href'));
|
||||
const author = $('span.displayname').text();
|
||||
const postfix = encodeURI($('section.title > a').attr('href'));
|
||||
const address = `https://matters.news${postfix}`;
|
||||
const cache = await ctx.cache.get(address);
|
||||
if (cache) {
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
const res = await got.get(url);
|
||||
const $ = cheerio.load(res.data);
|
||||
const list = $('article li section.container').get();
|
||||
const list = $('article section.list-item').get();
|
||||
|
||||
const proList = [];
|
||||
const indexList = [];
|
||||
@@ -16,10 +16,8 @@ module.exports = async (ctx) => {
|
||||
const $ = cheerio.load(item);
|
||||
const time = $('time').attr('datetime');
|
||||
const title = $('h2').text();
|
||||
const author = $('div.content a')
|
||||
.attr('href')
|
||||
.replace(/\/@(.*?)\/.*/, '$1');
|
||||
const partial = encodeURI($('div.content a').attr('href'));
|
||||
const author = $('span.displayname').text();
|
||||
const partial = encodeURI($('section.title > a').attr('href'));
|
||||
const completeUrl = `https://matters.news${partial}`;
|
||||
const cache = await ctx.cache.get(completeUrl);
|
||||
if (cache) {
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = async (ctx) => {
|
||||
|
||||
const res = await got.get(url);
|
||||
const $ = cheerio.load(res.data);
|
||||
const list = $('li section.container').get();
|
||||
const list = $('section.list-item').get();
|
||||
|
||||
const proList = [];
|
||||
const indexList = [];
|
||||
@@ -16,10 +16,8 @@ module.exports = async (ctx) => {
|
||||
const $ = cheerio.load(item);
|
||||
const time = $('time').attr('datetime');
|
||||
const title = $('h2').text();
|
||||
const author = $('div.content a')
|
||||
.attr('href')
|
||||
.replace(/\/@(.*?)\/.*/, '$1');
|
||||
const postfix = encodeURI($('div.content a').attr('href'));
|
||||
const author = $('span.displayname').text();
|
||||
const postfix = encodeURI($('section.title > a').attr('href'));
|
||||
const address = `https://matters.news${postfix}`;
|
||||
const cache = await ctx.cache.get(address);
|
||||
if (cache) {
|
||||
|
||||
Reference in New Issue
Block a user