添加新新漫画
This commit is contained in:
		
							parent
							
								
									bb1a40c1a9
								
							
						
					
					
						commit
						e67a624630
					
				
							
								
								
									
										4
									
								
								bin/reptile/177mh_net/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								bin/reptile/177mh_net/README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
古风漫画网
 | 
			
		||||
www.gufengmh8.com
 | 
			
		||||
find.js 查找功能
 | 
			
		||||
section.js 获取章节列表
 | 
			
		||||
							
								
								
									
										17
									
								
								bin/reptile/177mh_net/config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								bin/reptile/177mh_net/config.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
// import find from "./find"
 | 
			
		||||
// import imglist from "./picture"
 | 
			
		||||
// import section from "./section"
 | 
			
		||||
find = require("./find")
 | 
			
		||||
imglist = require("./picture")
 | 
			
		||||
section = require("./section")
 | 
			
		||||
let name = "新新漫画"
 | 
			
		||||
let version = "20.01.06"
 | 
			
		||||
let type = 1
 | 
			
		||||
module.exports = {
 | 
			
		||||
    name,
 | 
			
		||||
    version,
 | 
			
		||||
    type,
 | 
			
		||||
    find,
 | 
			
		||||
    imglist,
 | 
			
		||||
    section
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										63
									
								
								bin/reptile/177mh_net/find.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								bin/reptile/177mh_net/find.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,63 @@
 | 
			
		||||
let axios = require('axios')
 | 
			
		||||
const cheerio = require('cheerio');
 | 
			
		||||
const qs = require('querystring');
 | 
			
		||||
let getcontlist = async (text) => {
 | 
			
		||||
    let $ = cheerio.load(text)
 | 
			
		||||
    let list = []
 | 
			
		||||
    // console.log($("ul").eq(1).html())
 | 
			
		||||
    $ =  cheerio.load($("ul").eq(1).html())
 | 
			
		||||
    // console.log($("li").eq(0).html())
 | 
			
		||||
    $("dl").each((index,ele)=>{
 | 
			
		||||
        let j = cheerio.load($(ele).html(),{decodeEntities: false})
 | 
			
		||||
       let name=  j("dd h1 a").html().replace(/<em>/g,"").replace(/<\/em>/g,"")
 | 
			
		||||
       let url = j("dd h1 a").attr("href")
 | 
			
		||||
        let data = "暂无数据"
 | 
			
		||||
        let update = "暂无数据"
 | 
			
		||||
        let obj = {name,url,data,update};
 | 
			
		||||
 | 
			
		||||
    //    console.log(name,url)
 | 
			
		||||
        // console.log(unescape(j('.tt').eq(0).html()))
 | 
			
		||||
        // obj.update = j('.tt').eq(0).html()
 | 
			
		||||
        // obj.name = j(".ell a").eq(0).html()
 | 
			
		||||
        // obj.date = j(".updateon").eq(0).html().replace(/\s+/g,"").replace('<em>1.0</em>','')
 | 
			
		||||
        // obj.url = j(".cover").eq(0).attr('href')
 | 
			
		||||
        // // console.log(obj)
 | 
			
		||||
        list.push(obj)
 | 
			
		||||
    })
 | 
			
		||||
    return list
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
let gethtml = async (name) => {
 | 
			
		||||
    name = qs.escape(name)
 | 
			
		||||
    let url = `https://so.177mh.net/k.php?k=${name}`
 | 
			
		||||
    // console.log(url)
 | 
			
		||||
    let text = ""
 | 
			
		||||
    await axios.get(url).then((a) => {
 | 
			
		||||
        // console.log(a.text)
 | 
			
		||||
        // res(a.text)
 | 
			
		||||
        text = a.data
 | 
			
		||||
    })
 | 
			
		||||
    let list = []
 | 
			
		||||
    try {
 | 
			
		||||
        list =  await getcontlist(text)
 | 
			
		||||
        
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
        // console.log(error)
 | 
			
		||||
    }
 | 
			
		||||
    list = {name:"新新漫画",list}
 | 
			
		||||
    return list
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
let getlist =  (name) => {
 | 
			
		||||
    return new Promise(async (res,rej)=>{
 | 
			
		||||
        let html;
 | 
			
		||||
        html = await gethtml(name)
 | 
			
		||||
        // console.log(JSON.stringify(html))
 | 
			
		||||
        res(html);
 | 
			
		||||
    })
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
// getlist("隐之王")
 | 
			
		||||
module.exports = getlist
 | 
			
		||||
							
								
								
									
										73
									
								
								bin/reptile/177mh_net/picture.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								bin/reptile/177mh_net/picture.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,73 @@
 | 
			
		||||
const cheerio = require('cheerio');
 | 
			
		||||
const axios = require('axios')
 | 
			
		||||
let getscript = async (url) => {
 | 
			
		||||
    let text;
 | 
			
		||||
    url = "https://www.177mh.net" + url
 | 
			
		||||
    await axios.get(url).then((res)=>{
 | 
			
		||||
        // text = res.text
 | 
			
		||||
        // console.log(res.data)
 | 
			
		||||
        text = res.data
 | 
			
		||||
    })
 | 
			
		||||
    let $ = cheerio.load(text);
 | 
			
		||||
    let list;
 | 
			
		||||
    let chapterImages;
 | 
			
		||||
    let cid,coid,ser,imgs;
 | 
			
		||||
    $('script').each((index, ele) => {
 | 
			
		||||
        // console.log(ele)
 | 
			
		||||
        let text = $(ele).html()
 | 
			
		||||
        if (text.search('eval') != -1) {
 | 
			
		||||
            eval(text)
 | 
			
		||||
            // imghost
 | 
			
		||||
            // console.log(msg.split("|"))
 | 
			
		||||
            chapterImages = msg.split("|")
 | 
			
		||||
            // console.log(chapterImages)
 | 
			
		||||
             cid  =  /\/colist_(\d+)\.html/.exec(link_z)[1];
 | 
			
		||||
            coid = /\/(\d+\/\d+)\.html/.exec(url);
 | 
			
		||||
            coid = /\d+\/(\d+)/.exec(coid)[1];
 | 
			
		||||
            console.log(img_s)
 | 
			
		||||
            ser = `https://css.gdbyhtl.net/img_v1/cn_svr.aspx?z=gn&s=${img_s}&cid=${cid}&coid=${coid}`
 | 
			
		||||
            imgs = img_s
 | 
			
		||||
            // let r = ""
 | 
			
		||||
            
 | 
			
		||||
            // eval(r)
 | 
			
		||||
            // let qianzso = img_qianzso[img_s]
 | 
			
		||||
            // console.log(qianzso)
 | 
			
		||||
            // var reg = /^http(s)?:\/\/(.*?)\//
 | 
			
		||||
            // imghost = reg.exec(pageImage)[2]
 | 
			
		||||
            // imghost = "http://" + imghost
 | 
			
		||||
            // imghost 图片域名
 | 
			
		||||
            // chapterPath 图片基本链接path
 | 
			
		||||
            // chapterImages 图片地址数组
 | 
			
		||||
            // pageTitle 标题
 | 
			
		||||
            // pageUrl 页面基础url
 | 
			
		||||
            // prevChapterData 上一页信息 
 | 
			
		||||
            // nextChapterData 下一页信息
 | 
			
		||||
            // 页面地址为 基础url + 页信息.id
 | 
			
		||||
            // console.log({ imghost, chapterPath, chapterImages, pageTitle, pageUrl, prevChapterData, nextChapterData, pageImage })
 | 
			
		||||
            // let down = pageUrl.replace("https://www.gufengmh8.com","") + nextChapterData.id + ".html"
 | 
			
		||||
            // let upurl = pageUrl.replace("https://www.gufengmh8.com","") + prevChapterData.id + ".html"
 | 
			
		||||
            // console.log(list)
 | 
			
		||||
        }
 | 
			
		||||
    })
 | 
			
		||||
    let r = "";
 | 
			
		||||
    console.log(ser)
 | 
			
		||||
    await axios.get(ser).then((res)=>{
 | 
			
		||||
        r = res.data
 | 
			
		||||
        // console.log(res)
 | 
			
		||||
    })
 | 
			
		||||
    eval(r)
 | 
			
		||||
    // console.log(img_qianzso)
 | 
			
		||||
 | 
			
		||||
    let qianzso = img_qianzso[imgs]
 | 
			
		||||
    // console.log(qianzso)
 | 
			
		||||
    if(webpshow == 1){
 | 
			
		||||
        chapterImages = chapterImages.map(x => x + ".webp")
 | 
			
		||||
    }
 | 
			
		||||
    list = { chapterImages , imghost:qianzso ,chapterPath:"" }
 | 
			
		||||
    // console.log(list)
 | 
			
		||||
    return list;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
getscript('/201008/167494.html')
 | 
			
		||||
module.exports = getscript
 | 
			
		||||
							
								
								
									
										53
									
								
								bin/reptile/177mh_net/section.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								bin/reptile/177mh_net/section.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,53 @@
 | 
			
		||||
let axios = require('axios')
 | 
			
		||||
const cheerio = require('cheerio');
 | 
			
		||||
 | 
			
		||||
let getsection = async (text)=>{
 | 
			
		||||
    let $ = cheerio.load(text)
 | 
			
		||||
    // console.log(text)
 | 
			
		||||
    let list = [];
 | 
			
		||||
    let l = $(".ar_rlos_bor").eq(0).html()
 | 
			
		||||
    $ = cheerio.load(l,{decodeEntities: false})
 | 
			
		||||
    $("li").each((index,ele)=>{
 | 
			
		||||
        let con = {}
 | 
			
		||||
        let j = cheerio.load($(ele).html(),{decodeEntities: false})
 | 
			
		||||
        con.url = j("a").eq(0).attr("href")
 | 
			
		||||
        con.title = j("a").eq(0).html()
 | 
			
		||||
        // console.log(con)
 | 
			
		||||
        // console.log($(ele).html())
 | 
			
		||||
        list.push(con)
 | 
			
		||||
 | 
			
		||||
    })
 | 
			
		||||
    // console.log(txt) 
 | 
			
		||||
    // console.log($(".comic-chapters ").eq(0).html())
 | 
			
		||||
    // $(".comic-chapters").each((index,ele)=>{
 | 
			
		||||
    //     // $(ele)
 | 
			
		||||
    //     // console.log($(ele).html())
 | 
			
		||||
    //     let obj = {}
 | 
			
		||||
    //     let j = cheerio.load($(ele).html(),{decodeEntities: false})
 | 
			
		||||
    //     obj.title =  j(".pull-left").eq(0).html().replace('<span>','').replace('</span>','')
 | 
			
		||||
    //     obj.list = []
 | 
			
		||||
    //     j('li').each(function (index,ele){
 | 
			
		||||
    //         let con = {}
 | 
			
		||||
    //         con.url =  j(this).find("a").eq(0).attr('href')
 | 
			
		||||
    //         con.title = j(this).find("a").eq(0).html().replace('<span>','').replace('</span>','').replace(/\s+/g,"").replace('\\n','')
 | 
			
		||||
    //         obj.list.push(con)
 | 
			
		||||
    //     })
 | 
			
		||||
    //     // console.log(obj)
 | 
			
		||||
    //     list.push(obj)
 | 
			
		||||
    // })
 | 
			
		||||
    // console.log(list)
 | 
			
		||||
    return list
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
let gethtml = async (url)=>{
 | 
			
		||||
    let text;
 | 
			
		||||
    await axios.get(url).then((res)=>{
 | 
			
		||||
        text = res.data
 | 
			
		||||
    })
 | 
			
		||||
    let list = await getsection(text)
 | 
			
		||||
    // console.log(JSON.stringify(list))
 | 
			
		||||
    return list
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
gethtml('https://www.177mh.net/colist_111001.html')
 | 
			
		||||
module.exports = gethtml
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user