mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): 腾讯较真查证平台 (#7934)
This commit is contained in:
@@ -1,10 +1,19 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const cheerio = require('cheerio');
|
||||
const CryptoJS = require('crypto-js');
|
||||
|
||||
const getRequestToken = () => {
|
||||
const t = 'jzhotdata',
|
||||
e = 'sgn51n6r6q97o6g3',
|
||||
n = CryptoJS.DES.encrypt(Date.now().toString() + '-' + e, t).toString();
|
||||
return encodeURIComponent(n);
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const response = await got({
|
||||
method: 'get',
|
||||
url: 'https://vp.fact.qq.com/loadmore?artnum=0&page=0',
|
||||
url: `https://vp.fact.qq.com/loadmore?artnum=0&page=0&token=${getRequestToken()}`,
|
||||
headers: {
|
||||
Referer: 'https://vp.fact.qq.com/home',
|
||||
},
|
||||
@@ -18,8 +27,8 @@ module.exports = async (ctx) => {
|
||||
const simple = {
|
||||
title: `【${item.explain}】${item.title}`,
|
||||
description: `<img src="${item.cover}">${item.abstract}`,
|
||||
pubDate: new Date(item.date).toUTCString(),
|
||||
author: `${item.author}${item.author !== item.authordesc ? '-' + item.authordesc : ''}`,
|
||||
pubDate: parseDate(item.date, 'YYYY-MM-DD'),
|
||||
author: item.author,
|
||||
link: link,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user