mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
Merge pull request #6631 from allencch/manhuagui
fix: manhuagui parse for the blocked comics
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user