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