const url = https://e.infogram.com/dab81851-e3af-4767-b1f5-9b54eb900274?parent_url=https%3A%2F%2Festadisticas.pr%2Fen%2Fcovid-19&src=embed#async_embed
如果有一种可以访问数据的方式,我将不胜感激。
index.js
const cheerio = require('cheerio'); const axios = require('axios').default; const main = async() =>{ const url = 'https://e.infogram.com/dab81851-e3af-4767-b1f5-9b54eb900274?parent_url=https%3A%2F%2Festadisticas.pr%2Fen%2Fcovid-19&src=embed#async_embed' const {data} = await axios.get(url, {method: 'GET'}); const $ = cheerio.load(data); console.log($.html()) } main();
[Hello开发者,我正在尝试从以下网站const URL = https://e.infogram.com/dab81851-e3af-4767-b1f5-9b54eb900274?parent_url=https%3A获取与我的国家中与covid19相关的一些数据%2F%...