const axios = require('axios')
const cheerio = require('cheerio')
const crawler = async () => {
let result,
$,
text,
summary = []
for (let v of rs2) {
result = await axios.get(v.link)
$ = cheerio.load(result.data)
text = $('.story_area .con_tx').text()
summary.push(text)
}
}
crawler()
const puppeteer = require('puppeteer')
const crawler2 = async () => {
const browser = await puppeteer.launch({ headless: false })
const page = await browser.newPage()
await page.goto(rs2[0].link)
await page.waitFor(2000)
await page.goto(rs2[1].link)
await page.waitFor(3000)
await page.close()
await browser.close()
}
crawler2()