Skip to content

Commit

Permalink
Reto mouredev#18 - JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
BRivasTorres committed Jan 15, 2024
1 parent 45b9136 commit 1521e19
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import puppeteer from "puppeteer";

const webScraping = async() => {
const browser = await puppeteer.launch({
headless: false,
slowMo: 400
});
const page = await browser.newPage();
await page.goto("https://holamundo.day");
const result = await page.evaluate(() => {
const blockquotes = document.querySelectorAll("blockquote");
const data = [...blockquotes].slice(21,).map(blockquote => {
const time = blockquote.innerText
return time

})
return data
})
console.log(result.join('\n'))
await browser.close()
}

webScraping()

0 comments on commit 1521e19

Please sign in to comment.