mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 15:21:59 +08:00
chore(deps-dev): bump prettier from 1.19.1 to 2.0.2
This commit is contained in:
@@ -12,20 +12,12 @@ module.exports = async (ctx) => {
|
||||
const list = $('a.list-group-item')
|
||||
.slice(0, 10)
|
||||
.filter((i, e) => $(e).find('h4.media-heading i').length === 0)
|
||||
.map(function() {
|
||||
.map(function () {
|
||||
const info = {
|
||||
title: $(this)
|
||||
.find('h4.media-heading')
|
||||
.text()
|
||||
.trim(),
|
||||
author: $(this)
|
||||
.find('.text-500')
|
||||
.text(),
|
||||
title: $(this).find('h4.media-heading').text().trim(),
|
||||
author: $(this).find('.text-500').text(),
|
||||
link: $(this).attr('href'),
|
||||
date: $(this)
|
||||
.find('p.pull-right.media-date strong')
|
||||
.text()
|
||||
.trim(),
|
||||
date: $(this).find('p.pull-right.media-date strong').text().trim(),
|
||||
};
|
||||
return info;
|
||||
})
|
||||
@@ -43,13 +35,7 @@ module.exports = async (ctx) => {
|
||||
const response = await got.get(itemUrl);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
const description =
|
||||
$('#question-preview')
|
||||
.html()
|
||||
.trim() +
|
||||
$('.article-body')
|
||||
.html()
|
||||
.trim();
|
||||
const description = $('#question-preview').html().trim() + $('.article-body').html().trim();
|
||||
|
||||
const single = {
|
||||
title: info.title,
|
||||
|
||||
Reference in New Issue
Block a user