diff --git a/lib/routes/matters/author.js b/lib/routes/matters/author.js index 7db638c54..90f29a4cc 100644 --- a/lib/routes/matters/author.js +++ b/lib/routes/matters/author.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const res = await axios.get(url); const $ = cheerio.load(res.data); - const list = $('section.jsx-1110843272.container').get(); + const list = $('li section.container').get(); const proList = []; const indexList = []; @@ -16,7 +16,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(item); const time = $('time').attr('datetime'); const title = $('h2').text(); - const postfix = encodeURI($('a.jsx-1110843272').attr('href')); + const postfix = encodeURI($('div.content a').attr('href')); const address = `https://matters.news${postfix}`; const cache = await ctx.cache.get(address); if (cache) { diff --git a/lib/routes/matters/hot.js b/lib/routes/matters/hot.js index e35ddfecd..75b241a83 100644 --- a/lib/routes/matters/hot.js +++ b/lib/routes/matters/hot.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const res = await axios.get(url); const $ = cheerio.load(res.data); - const list = $('section.jsx-1110843272.container').get(); + const list = $('article li section.container').get(); const proList = []; const indexList = []; @@ -16,7 +16,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(item); const time = $('time').attr('datetime'); const title = $('h2').text(); - const partial = encodeURI($('a.jsx-1110843272').attr('href')); + const partial = encodeURI($('div.content a').attr('href')); const completeUrl = `https://matters.news${partial}`; const cache = await ctx.cache.get(completeUrl); if (cache) { diff --git a/lib/routes/matters/tags.js b/lib/routes/matters/tags.js index ed138af49..f02c6191f 100644 --- a/lib/routes/matters/tags.js +++ b/lib/routes/matters/tags.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const res = await axios.get(url); const $ = cheerio.load(res.data); - const list = $('section.jsx-1110843272.container').get(); + const list = $('li section.container').get(); const proList = []; const indexList = []; @@ -16,7 +16,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(item); const time = $('time').attr('datetime'); const title = $('h2').text(); - const postfix = encodeURI($('a.jsx-1110843272').attr('href')); + const postfix = encodeURI($('div.content a').attr('href')); const address = `https://matters.news${postfix}`; const cache = await ctx.cache.get(address); if (cache) { diff --git a/lib/routes/matters/topics.js b/lib/routes/matters/topics.js index e6946706c..4d7183c62 100644 --- a/lib/routes/matters/topics.js +++ b/lib/routes/matters/topics.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const res = await axios.get(url); const $ = cheerio.load(res.data); - const list = $('section.jsx-1110843272.container').get(); + const list = $('li section.container').get(); const proList = []; const indexList = []; @@ -16,7 +16,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(item); const time = $('time').attr('datetime'); const title = $('h2').text(); - const postfix = encodeURI($('a.jsx-1110843272').attr('href')); + const postfix = encodeURI($('div.content a').attr('href')); const address = `https://matters.news${postfix}`; const cache = await ctx.cache.get(address); if (cache) {