解决了err之后不关闭浏览器的bug
This commit is contained in:
parent
ea986575db
commit
9bfd44301f
@ -1,4 +0,0 @@
|
||||
古风漫画网
|
||||
www.gufengmh8.com
|
||||
find.js 查找功能
|
||||
section.js 获取章节列表
|
@ -1,4 +0,0 @@
|
||||
古风漫画网
|
||||
www.gufengmh8.com
|
||||
find.js 查找功能
|
||||
section.js 获取章节列表
|
@ -1,4 +0,0 @@
|
||||
古风漫画网
|
||||
www.gufengmh8.com
|
||||
find.js 查找功能
|
||||
section.js 获取章节列表
|
@ -58,5 +58,5 @@ let getlist = (name) => {
|
||||
})
|
||||
|
||||
}
|
||||
getlist("青春")
|
||||
// getlist("青春")
|
||||
module.exports = getlist
|
@ -1,4 +0,0 @@
|
||||
古风漫画网
|
||||
www.gufengmh8.com
|
||||
find.js 查找功能
|
||||
section.js 获取章节列表
|
@ -9,8 +9,12 @@ let gethtml = (name) => {
|
||||
}).then(async (browser) => {
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
try {
|
||||
await page.goto(mainurl);
|
||||
} catch (error) {
|
||||
browser.close()
|
||||
res([])
|
||||
}
|
||||
await page.click(".searchtext1")
|
||||
await page.type(".searchtext1", name);
|
||||
// const usernameValue = await page.$eval(".searchtext1", el => el.value);
|
||||
|
@ -1,4 +0,0 @@
|
||||
古风漫画网
|
||||
www.gufengmh8.com
|
||||
find.js 查找功能
|
||||
section.js 获取章节列表
|
@ -10,7 +10,14 @@ let gethtml = (name) => {
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
// await page.goto(mainurl);
|
||||
try {
|
||||
await page.goto(mainurl);
|
||||
} catch (error) {
|
||||
console.log("err")
|
||||
browser.close()
|
||||
res([])
|
||||
}
|
||||
await page.type(".searchtext1", name);
|
||||
// const usernameValue = await page.$eval(".searchtext1", el => el.value);
|
||||
await page.click("#btnSend1")
|
||||
|
Loading…
Reference in New Issue
Block a user