Skip to content

Instantly share code, notes, and snippets.

View ernest0galdamez's full-sized avatar
😀

Ernesto Galdamez ernest0galdamez

😀
View GitHub Profile
@ernest0galdamez
ernest0galdamez / Puppeteer Web Scraping for Dealer Information.txt
Created May 28, 2024 04:47
This Node.js script uses Puppeteer to scrape dealer information from a dynamically rendered webpage. It navigates to the specified URL, waits for all JavaScript to execute, and then extracts relevant details such as dealer names, roles, addresses, websites, emails, and phone numbers from each listed dealer under different countries. The extracte…
const puppeteer = require('puppeteer');
const fs = require('fs');
// Function to scrape website data
async function scrapeWebsite() {
// Launch a headless browser
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Go to the specified URL, waiting until all network connections are idle