fix(route): fix pubDate timezone for route e-hentai (#13774)
* fix(e-hentai): fix pubDate timezone for non-GMT servers * Update lib/v2/ehentai/ehapi.js ---------
This commit is contained in:
parent
af11b7e767
commit
90b494002e
|
|
@ -1,5 +1,6 @@
|
|||
const got = require('@/utils/got');
|
||||
const logger = require('@/utils/logger');
|
||||
const timezone = require('@/utils/timezone');
|
||||
const cheerio = require('cheerio');
|
||||
const path = require('path');
|
||||
const config = require('@/config').value.ehentai;
|
||||
|
|
@ -76,7 +77,8 @@ async function parsePage(cache, data, get_bittorrent = false, embed_thumb = fals
|
|||
async function parseElement(cache, element) {
|
||||
const el = $(element);
|
||||
const title = el.find('div.glink').html();
|
||||
const pubDate = el.find('div[id^="posted_"]').html();
|
||||
const rawDate = el.find('div[id^="posted_"]').text();
|
||||
const pubDate = rawDate ? timezone(rawDate, 0) : rawDate;
|
||||
let el_a;
|
||||
let el_img;
|
||||
// match layout
|
||||
|
|
|
|||
Loading…
Reference in New Issue