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 19:19:24 +00:00
|
|
|
const response = await fetch(url);
|
|
|
|
const body = await response.text();
|
|
|
|
|
|
|
|
console.log(body);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2023-04-11 19:05:44 +00:00
|
|
|
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);
|
2023-04-11 19:19:24 +00:00
|
|
|
*/
|