diff --git a/lib/routes/manhuagui/comic.js b/lib/routes/manhuagui/comic.js index 2ccefe675..5fef23310 100644 --- a/lib/routes/manhuagui/comic.js +++ b/lib/routes/manhuagui/comic.js @@ -1,6 +1,7 @@ const { resolve } = require('url'); const cheerio = require('cheerio'); const got = require('@/utils/got'); +const LZString = require('lz-string'); const getChapters = ($) => $('.chapter-list > ul') @@ -22,6 +23,14 @@ module.exports = async (ctx) => { const { data } = await got.get(`https://www.manhuagui.com/comic/${id}/`); const $ = cheerio.load(data); + if ($('#__VIEWSTATE').length > 0) { + const n = LZString.decompressFromBase64($('#__VIEWSTATE').val()); + if (n) { + $('#erroraudit_show').replaceWith(n); + $('#__VIEWSTATE').remove(); + } + } + const bookTitle = $('.book-title > h1').text(); const bookIntro = $('#intro-all').text(); const coverImgSrc = $('.book-cover img').attr('src');