Merge pull request #6631 from allencch/manhuagui
fix: manhuagui parse for the blocked comics
This commit is contained in:
commit
2c0d14ecd1
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue