修复
This commit is contained in:
		
							parent
							
								
									9af90677b5
								
							
						
					
					
						commit
						547282ba7d
					
				@ -4,16 +4,16 @@ const qs = require('querystring');
 | 
			
		||||
let getcontlist = async (text) => {
 | 
			
		||||
    let $ = cheerio.load(text)
 | 
			
		||||
    let list = []
 | 
			
		||||
    $ =  cheerio.load($(".mh-list.col7").eq(0).html())
 | 
			
		||||
    $ =  cheerio.load($(".am-avg-sm-3.am-thumbnails.list").eq(0).html())
 | 
			
		||||
    // console.log($("li").eq(0).html())
 | 
			
		||||
    $("li").each((index,ele)=>{
 | 
			
		||||
        let j = cheerio.load($(ele).html(),{decodeEntities: false})
 | 
			
		||||
        // console.log(unescape(j('.tt').eq(0).html()))
 | 
			
		||||
        let obj = {};
 | 
			
		||||
        obj.update = j('.chapter').eq(0).text()
 | 
			
		||||
        obj.name = j(".title a").eq(0).attr('title')
 | 
			
		||||
        obj.update = j('.tip').eq(0).text()
 | 
			
		||||
        obj.name = j(".am-thumbnail a").eq(0).attr('title')
 | 
			
		||||
        obj.date = '未获取'
 | 
			
		||||
        obj.url = 'https://www.tohomh123.com' + j(".title a").eq(0).attr('href')
 | 
			
		||||
        obj.url = 'https://www.tohomh123.com' + j(".am-thumbnail a").eq(0).attr('href')
 | 
			
		||||
        // console.log(obj)
 | 
			
		||||
        list.push(obj)
 | 
			
		||||
    })
 | 
			
		||||
@ -48,7 +48,7 @@ let getlist =  (name) => {
 | 
			
		||||
        try {
 | 
			
		||||
            let html;
 | 
			
		||||
            html = await gethtml(name, 1)
 | 
			
		||||
            // console.log(JSON.stringify(html))
 | 
			
		||||
            console.log(JSON.stringify(html))
 | 
			
		||||
            res(html);
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
            rej([])
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user