This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const VIN_SELECTOR = '#page > div > div.pane-content-constrain > main > div > div > div > div > section.side > aside > p.extra-info > span:nth-child(3)'; | |
let vins = []; | |
async function run() { | |
let browser = await puppeteer.launch({ | |
headless: false | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require('puppeteer'); | |
const USED_CAR_SELECTOR = '#react-content > div > section > div.vehicles > div:nth-child(INDEX) > div > a'; | |
const VIN_SELECTOR = '#page > div > div.pane-content-constrain > main > div > div > div > div > section.side > aside > p.extra-info > span:nth-child(3)'; | |
async function run() { | |
let vins = []; | |
let browser = await puppeteer.launch(); | |
let page; | |
let pages = await browser.pages(); | |
if (pages.length > 0) { |