mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
@@ -1,6 +1,6 @@
|
||||
const axios = require('../../../utils/axios');
|
||||
const cheerio = require('cheerio');
|
||||
// const timezone = require('../../utils/timezone');
|
||||
const date = require('../../../utils/date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { id } = ctx.params;
|
||||
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
|
||||
link: `https://wemp.app${$(e)
|
||||
.find('.post-item__title')
|
||||
.attr('href')}`,
|
||||
pubDate: timezone(
|
||||
pubDate: date(
|
||||
`${year} ${$(e)
|
||||
.find('.post-item__date')
|
||||
.text()
|
||||
@@ -34,11 +34,6 @@ module.exports = async (ctx) => {
|
||||
author,
|
||||
}));
|
||||
|
||||
// to be replaced
|
||||
function timezone(html, timezone) {
|
||||
return new Date(new Date(html).getTime() - 60 * 60 * 1000 * (timezone + new Date().getTimezoneOffset() / 60)).toUTCString();
|
||||
}
|
||||
|
||||
ctx.state.data = {
|
||||
title: `微信公众号 - ${author}`,
|
||||
link: `https://wemp.app/accounts/${id}/`,
|
||||
|
||||
Reference in New Issue
Block a user