Add base file

This commit is contained in:
Tyler Perkins 2023-01-30 20:58:54 -05:00
parent 5c1b83b0b0
commit f750df107e
2 changed files with 21 additions and 0 deletions

View File

@ -1,2 +1,6 @@
# ohlq-web-scrapper
Test using [Puppeteer](https://pptr.dev) to scrape [ohlq](https://ohlq.com).

17
index.js Normal file
View File

@ -0,0 +1,17 @@
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({width: 1080, height: 1024});
await page.goto('https://www.ohlq.com/search-results?query=weller&contenttype=Product');
const ageButton = await page.$("button[data-test='ageVerificationButton']");
await ageButton.click();
await page.screenshot({path: 'screenshot.jpg'});
await browser.close();
})();