SecretAgent
SecretAgent is a web browser that's built for scraping.
- <input checked="" disabled="" type="checkbox"> Built for scraping - it's the first modern headless browsers designed specifically for scraping instead of just automated testing.
- <input checked="" disabled="" type="checkbox"> Designed for web developers - We've recreated a fully compliant DOM directly in NodeJS allowing you bypass the headaches of previous scraper tools.
- <input checked="" disabled="" type="checkbox"> Powered by Chromium - The powerful Chromium engine sits under the hood, allowing for lightning fast rendering.
- <input checked="" disabled="" type="checkbox"> Emulates any modern browser - Emulator plugins make it easy to disguise your script as practically any browser.
- <input checked="" disabled="" type="checkbox"> Avoids detection along the entire stack - Don't be blocked because of TLS fingerprints in your networking stack.
Check out our website for more details.
Installation
`
shell script
npm i secret-agent
or
```shell script
yarn add secret-agent
Usage
SecretAgent provides access to the W3C DOM specification without the need for Puppeteer's complicated evaluate callbacks and multi-context switching:
const SecretAgent = require('secret-agent');
(async () => {
const browser = await SecretAgent.createBrowser();
await browser.goto('https://example.org');
const title = await browser.document.querySelector('title').textContent;
const intro = await browser.document.querySelector('p:first-child').textContent;
await browser.close();
})();
Browse the full API docs.