From 5137d188eb18e1b0e4990572aa4a6220dbd62089 Mon Sep 17 00:00:00 2001 From: theluyuan <1162963624@qq.com> Date: Sun, 27 Jun 2021 00:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=91=E9=A3=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/reptile/pufei_net/config.js | 2 +- bin/reptile/pufei_net/find.js | 4 ++-- bin/reptile/pufei_net/picture.js | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/reptile/pufei_net/config.js b/bin/reptile/pufei_net/config.js index a92131c..74a2baa 100644 --- a/bin/reptile/pufei_net/config.js +++ b/bin/reptile/pufei_net/config.js @@ -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, diff --git a/bin/reptile/pufei_net/find.js b/bin/reptile/pufei_net/find.js index 35a4000..069d4d1 100644 --- a/bin/reptile/pufei_net/find.js +++ b/bin/reptile/pufei_net/find.js @@ -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) => { diff --git a/bin/reptile/pufei_net/picture.js b/bin/reptile/pufei_net/picture.js index 6c18b32..db70e9f 100644 --- a/bin/reptile/pufei_net/picture.js +++ b/bin/reptile/pufei_net/picture.js @@ -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 = []