我正试图从naukri.com网站上用cheerio找到工作。预期输出是整个页面的文本,而不是下面的输出。
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NX744H"height="0" width="0" style="display:none;visibility:hidden"></iframe>
<img src="https://www.naukri.com/akam/11/pixel_74f1c4ec?a=dD1hYjJmYTA0N2JkNDM1ODI5NmY0YmZlNzk1ZTMxNGI4YTU1YmEyNWI4JmpzPW9mZg==" style="visibility: hidden; position: absolute; left: -999px; top: -999px;" />
这是密码
'use strict';
const { default: axios } = require('axios');
const cheerio = require('cheerio');
async function jobUrls() {
try {
const siteUrl = 'https://www.naukri.com/cse-jobs?k=cse';
const { data } = await axios({
method: 'GET',
url: siteUrl,
});
const $ = cheerio.load(data);
console.log($.text())
}
catch (er) {
console.log(er)
}
}
jobUrls();
暂无答案!
目前还没有任何答案,快来回答吧!