Skip to content

Instantly share code, notes, and snippets.

View yickson's full-sized avatar

Yickson Ramirez yickson

View GitHub Profile
@yickson
yickson / index.js
Created March 8, 2021 15:42
Download file with Puppeteer in Cloud Functions
const puppeteer = require('puppeteer');
const urlLogin = 'https://myweb.com';
exports.getzip = async (req, res) => {
const { user, pass, year, month } = req.body;
console.log('Starting puppeteer...');
const browser = await puppeteer.launch({ headless: true, slowMo: 100});
try {
const page = await browser.newPage();
console.log('go to url login...');
@yickson
yickson / README.md
Created April 25, 2021 19:43
Puppeteer in Cloud Function

Template for Google Cloud Function

Simple template of puppeteer in Cloud Function

I hope it helps you.

Packages:

  • Puppeteer 8.0.0
  • Node version 12