Add base file
This commit is contained in:
parent
5c1b83b0b0
commit
f750df107e
@ -1,2 +1,6 @@
|
|||||||
# ohlq-web-scrapper
|
# ohlq-web-scrapper
|
||||||
|
|
||||||
|
Test using [Puppeteer](https://pptr.dev) to scrape [ohlq](https://ohlq.com).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
17
index.js
Normal file
17
index.js
Normal 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();
|
||||||
|
})();
|
Loading…
Reference in New Issue
Block a user