修复扑飞

This commit is contained in:
theluyuan 2021-06-27 00:14:24 +08:00
parent 5dc5043525
commit 5137d188eb
3 changed files with 7 additions and 6 deletions

View File

@ -5,7 +5,7 @@ find = require("./find")
imglist = require("./picture") imglist = require("./picture")
section = require("./section") section = require("./section")
let name = "扑飞漫画" let name = "扑飞漫画"
let version = "20.02.27" let version = "21.06.27"
let type = 1 let type = 1
module.exports = { module.exports = {
name, name,

View File

@ -1,10 +1,10 @@
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');
const cheerio = require('cheerio') const cheerio = require('cheerio')
let mainurl = "http://www.pufei8.com" let mainurl = "http://www.pufei.cc"
let gethtml = (name) => { let gethtml = (name) => {
return new Promise(async (res, rej) => { return new Promise(async (res, rej) => {
puppeteer.launch({ puppeteer.launch({
headless: true, headless: false,
args: ['--no-sandbox', '--disable-setuid-sandbox','--blink-settings=imagesEnabled=false'] args: ['--no-sandbox', '--disable-setuid-sandbox','--blink-settings=imagesEnabled=false']
}).then(async (browser) => { }).then(async (browser) => {

View File

@ -1,14 +1,15 @@
const cheerio = require('cheerio'); const cheerio = require('cheerio');
const axios = require('axios') const axios = require('axios')
const iconv = require("iconv-lite") const iconv = require("iconv-lite")
let mainurl = "http://www.pufei8.com" let mainurl = "http://www.pufei.cc"
let getscript = async (url) => { let getscript = async (url) => {
let text; let text;
let imglist = [] // 图片列表 let imglist = [] // 图片列表
let scrurl = "" //图片域名 let scrurl = "" //图片域名
let baseurl = "" //图片基本url let baseurl = "" //图片基本url
// console.log(mainurl)
url = mainurl + url url = mainurl + url
// console.log(url) console.log(url)
await axios({url,responseType: 'arraybuffer',headers:{ await axios({url,responseType: 'arraybuffer',headers:{
'User-Agent': `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36` 'User-Agent': `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36`
}}).then((res)=>{ }}).then((res)=>{
@ -41,7 +42,7 @@ let getscript = async (url) => {
await axios({url : scrurl,responseType: 'arraybuffer'}).then((res)=>{ await axios({url : scrurl,responseType: 'arraybuffer'}).then((res)=>{
// text = res.text // text = res.text
let scr = iconv.decode(res.data, 'gbk'); let scr = iconv.decode(res.data, 'gbk');
scr=scr.substring(scr.indexOf("//分割获取id"),scr.indexOf("console.log(mh[4]);")) scr=scr.substring(scr.indexOf("imgserver = 'http://res.img.220012.net/';"),scr.indexOf("console.log(mh[4]);"))
// scr=scr.substring(scr.indexOf("current_img_base = photosr[page];") + 33,scr.indexOf("if (current_img_base.indexOf('http://') != -1 ) {")) // scr=scr.substring(scr.indexOf("current_img_base = photosr[page];") + 33,scr.indexOf("if (current_img_base.indexOf('http://') != -1 ) {"))
// let WebimgServer = [] // let WebimgServer = []
// let WebimgServerURL = [] // let WebimgServerURL = []