1 | # Running the examples
|
2 |
|
3 | Assuming you have a checkout of the Puppeteer repo and have run yarn (or npm i) to install the dependencies, the examples can be run from the root folder like so:
|
4 |
|
5 | ```sh
|
6 | NODE_PATH=../ node examples/search.js
|
7 | ```
|
8 |
|
9 | # Tips & Tricks
|
10 |
|
11 | ### Load a Chrome extension
|
12 |
|
13 | By default, Puppeteer disables extensions when launching Chrome. You can load a specific
|
14 | extension using:
|
15 |
|
16 | ```js
|
17 | const browser = await puppeteer.launch({
|
18 | headless: false,
|
19 | args: [
|
20 | '--disable-extensions-except=/path/to/extension/',
|
21 | '--load-extension=/path/to/extension/',
|
22 | ]
|
23 | });
|
24 | ```
|
25 |
|
26 | # Other resources
|
27 |
|
28 | > Other useful tools, articles, and projects that use Puppeteer.
|
29 |
|
30 | ## Rendering and web scraping
|
31 | - [Puppetron](https://github.com/cheeaun/puppetron) - Demo site that shows how to use Puppeteer and Headless Chrome to render pages. Inspired by [GoogleChrome/rendertron](https://github.com/GoogleChrome/rendertron).
|
32 | - [Thal](https://medium.com/@e_mad_ehsan/getting-started-with-puppeteer-and-chrome-headless-for-web-scrapping-6bf5979dee3e "An article on medium") - Getting started with Puppeteer and Chrome Headless for Web Scraping.
|
33 | - [pupperender](https://github.com/LasaleFamine/pupperender) - Express middleware that checks the User-Agent header of incoming requests, and if it matches one of a configurable set of bots, render the page using Puppeteer. Useful for PWA rendering.
|
34 | - [headless-chrome-crawler](https://github.com/yujiosaka/headless-chrome-crawler) - Crawler that provides simple APIs to manipulate Headless Chrome and allows you to crawl dynamic websites.
|
35 |
|
36 | ## Testing
|
37 | - [angular-puppeteer-demo](https://github.com/Quramy/angular-puppeteer-demo) - Demo repository explaining how to use Puppeteer in Karma.
|
38 | - [mocha-headless-chrome](https://github.com/direct-adv-interfaces/mocha-headless-chrome) - Tool which runs client-side **mocha** tests in the command line through headless Chrome.
|