puppeteer-cloak
Version:
Secure your puppeteer for scraping
32 lines (23 loc) • 730 B
Markdown
Use this project to protect your puppeteer page from anti scraping or anti bot tests
```bash
yarn add puppeteer-cloak
npm install puppeteer-cloak
```
```js
const puppeteer = require('puppeteer');
const puppeteerCloak = require('puppeteer-cloak');
const browser = await puppeteer.launch();
// I always use this method to get the active page, and not to have to open a new tab
const page = (await this.browser.pages())[0];
// use this instead of the page, to get all the cloaking benefits
const cloakedPage = puppeteerCloak(page);
```
**Pavle Aleksic**
- <https://twitter.com/aleksicpaja>
This project is licensed under the terms of the MIT license.