2023-04-11 18:21:08 +00:00
|
|
|
import fetch from 'node-fetch';
|
2023-04-11 18:41:01 +00:00
|
|
|
import * as cheerio from 'cheerio';
|
2023-04-11 18:21:08 +00:00
|
|
|
|
|
|
|
const url = "https://en.wikipedia.org/wiki/List_of_Presidents_of_the_United_States";
|
|
|
|
|
2023-04-11 18:41:01 +00:00
|
|
|
const $ = cheerio.load(url);
|
2023-04-11 19:05:44 +00:00
|
|
|
//console.log($);
|
|
|
|
let data = $("mw-page-container-inner").html();
|
2023-04-11 18:21:08 +00:00
|
|
|
|
2023-04-11 18:41:01 +00:00
|
|
|
console.log(data);
|