Skip to content

Commit

Permalink
Merge pull request #631 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
pull[bot] committed Sep 19, 2022
2 parents 02cbed7 + b273cf0 commit cd97ef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/v2/huanqiu/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
const timezone = require('@/utils/timezone');

function getKeysRecursive(dic, key, attr, array) {
Object.values(dic).forEach((v) => {
Expand Down Expand Up @@ -47,9 +46,12 @@ module.exports = async (ctx) => {
url: item.link,
});
const content = cheerio.load(detailResponse.data);

item.description = content('textarea.article-content').text();
item.author = content('span', '.source').text();
item.pubDate = timezone(parseDate(content('p.time').text()), +8);
item.pubDate = parseDate(parseInt(content('textarea.article-time').text()));
item.category = content('meta[name="keywords"]').attr('content').split(',');

return item;
})
)
Expand Down

1 comment on commit cd97ef0

@vercel
Copy link

@vercel vercel bot commented on cd97ef0 Sep 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rsshub – ./

rsshub-git-master-narcissu.vercel.app
rsshub.tari.xyz
rsshub-narcissu.vercel.app

Please sign in to comment.