修复扑飞
This commit is contained in:
parent
5dc5043525
commit
5137d188eb
@ -5,7 +5,7 @@ find = require("./find")
|
||||
imglist = require("./picture")
|
||||
section = require("./section")
|
||||
let name = "扑飞漫画"
|
||||
let version = "20.02.27"
|
||||
let version = "21.06.27"
|
||||
let type = 1
|
||||
module.exports = {
|
||||
name,
|
||||
|
@ -1,10 +1,10 @@
|
||||
const puppeteer = require('puppeteer');
|
||||
const cheerio = require('cheerio')
|
||||
let mainurl = "http://www.pufei8.com"
|
||||
let mainurl = "http://www.pufei.cc"
|
||||
let gethtml = (name) => {
|
||||
return new Promise(async (res, rej) => {
|
||||
puppeteer.launch({
|
||||
headless: true,
|
||||
headless: false,
|
||||
args: ['--no-sandbox', '--disable-setuid-sandbox','--blink-settings=imagesEnabled=false']
|
||||
}).then(async (browser) => {
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
const cheerio = require('cheerio');
|
||||
const axios = require('axios')
|
||||
const iconv = require("iconv-lite")
|
||||
let mainurl = "http://www.pufei8.com"
|
||||
let mainurl = "http://www.pufei.cc"
|
||||
let getscript = async (url) => {
|
||||
let text;
|
||||
let imglist = [] // 图片列表
|
||||
let scrurl = "" //图片域名
|
||||
let baseurl = "" //图片基本url
|
||||
// console.log(mainurl)
|
||||
url = mainurl + url
|
||||
// console.log(url)
|
||||
console.log(url)
|
||||
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`
|
||||
}}).then((res)=>{
|
||||
@ -41,7 +42,7 @@ let getscript = async (url) => {
|
||||
await axios({url : scrurl,responseType: 'arraybuffer'}).then((res)=>{
|
||||
// text = res.text
|
||||
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 ) {"))
|
||||
// let WebimgServer = []
|
||||
// let WebimgServerURL = []
|
||||
|
Loading…
Reference in New Issue
Block a user