xicidaili使用代理抓取

This commit is contained in:
zhl 2019-05-09 13:52:24 +08:00
parent 102e92b016
commit 23cee74ef9

View File

@ -38,7 +38,7 @@ const parseOneXicidaili = async (idx) => {
let url = `https://www.xicidaili.com/nn/${idx + 1}`; let url = `https://www.xicidaili.com/nn/${idx + 1}`;
console.log('begin parse page:', url); console.log('begin parse page:', url);
try { try {
let html = await netUtil.getData(url, {}) let html = await proxyUtil.getData(url)
if (html) { if (html) {
const $ = cheerio.load(html); const $ = cheerio.load(html);
const trs = $("#ip_list tr"); const trs = $("#ip_list tr");