We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
社交媒体
https://www.mefcl.com
分享纯净好资源
const got = require('@/utils/got'); const cheerio = require('cheerio'); const { parseDate } = require('@/utils/parse-date');
async function getArticles() { const url = 'https://www.mefcl.com'; const { data: res } = await got(url); const $ = cheerio.load(res); const articles = $('section.content').eq(1).find('article'); return articles.toArray().map((elem) => { const a = $(elem).find('header > a'); return { title: a.find('h2').text(), description: a.find('p clsss="note"').text(), link: a.attr('href'), pubDate: parseDate($(elem).find('meta').find('time').attr('time')), category: $(elem) .find('article header p') .toArray() .map((elem) => $(elem).text()), }; }); }
module.exports = async (ctx) => { const articles = await getArticles(); ctx.state.data = { title: 'Mefcl', link: 'https://www.mefcl.com', item: articles, }; };
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
类型
社交媒体
网站地址
https://www.mefcl.com
网站描述
分享纯净好资源
需要生成什么内容?
const got = require('@/utils/got');
const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
async function getArticles() {
const url = 'https://www.mefcl.com';
const { data: res } = await got(url);
const $ = cheerio.load(res);
const articles = $('section.content').eq(1).find('article');
return articles.toArray().map((elem) => {
const a = $(elem).find('header > a');
return {
title: a.find('h2').text(),
description: a.find('p clsss="note"').text(),
link: a.attr('href'),
pubDate: parseDate($(elem).find('meta').find('time').attr('time')),
category: $(elem)
.find('article header p')
.toArray()
.map((elem) => $(elem).text()),
};
});
}
module.exports = async (ctx) => {
const articles = await getArticles();
ctx.state.data = {
title: 'Mefcl',
link: 'https://www.mefcl.com',
item: articles,
};
};
额外描述
No response
这不是重复的 RSS 请求
The text was updated successfully, but these errors were encountered: