https://github.com/thandon263/puppeteer
This sample application demonstrates how to use Headless Chrome via the Puppeteer module to take screenshots of webpages on Google App Engine Node.js standard environment. Firebase <=> NodeJS <=> Google App Engine <=> Firebase
https://github.com/thandon263/puppeteer
es2018 javascript nodejs nodejs-server-api puppeteer search-engine
Last synced: 3 months ago
JSON representation
This sample application demonstrates how to use Headless Chrome via the Puppeteer module to take screenshots of webpages on Google App Engine Node.js standard environment. Firebase <=> NodeJS <=> Google App Engine <=> Firebase
- Host: GitHub
- URL: https://github.com/thandon263/puppeteer
- Owner: thandon263
- Created: 2018-07-13T20:45:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T14:44:31.000Z (over 6 years ago)
- Last Synced: 2025-02-24T02:47:38.346Z (8 months ago)
- Topics: es2018, javascript, nodejs, nodejs-server-api, puppeteer, search-engine
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Headless Chrome on Google App Engine
This sample application demonstrates how to use Headless Chrome via the [Puppeteer](https://developers.google.com/web/tools/puppeteer/) module to take screenshots of webpages on [Google App Engine](https://cloud.google.com/appengine) Node.js [standard environment](https://cloud.google.com/appengine/docs/standard/nodejs).
## Running and deploying
Refer to the [appengine/README.md](../README.md) file for instructions on running and deploying.
---
## Hotel Price and Room Search
This application is mainly developed to help search for Hotels and book the best room with lowest price on the listing. There is a lot more depending on application,you can send to the database.
```javascript
...
var database = firebase.database();// [START browser]
const browser = await puppeteer.launch({
args: ['--no-sandbox'],
headless: true
});
// [END browser]
const page = await browser.newPage();
await page.setViewport({
width: 1000,
height: 900
});
...
```
You have a browser instance that runs on the server and it's termed Headless because you don't get to see the `Chrome browser` but it will be gathering data on the background.You have to close the browser when you are done with the search, to reduce service costs on Google App Engine.
```JavaScript
...
await browser.close();...
```---
### The Writer
Legend_of_theHeroGenius