What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-08 07:53:11
nodejs download image from url
const request = require('request'); const fs = require('fs'); async function download(url, dest) { /* Create an empty file where we can save data */ const file = fs.createWriteStream(dest); /* Using Promises so that we can use the ASYNC AWA... Add solution -
Javascript 2021-10-05 18:51:02
puppeteer example nodejs
require('dotenv/config') const puppeteer = require('puppeteer') (async () => { try { const browser = await puppeteer.launch({ headless: false, args: [ '--allow-external-pages', '--allow-third-party-modules', '--data-reduction-prox... Add solution -
Javascript 2021-10-05 09:50:05
download image in nodejs
const request = require('request'); const fs = require('fs'); async function download(url, dest) { /* Create an empty file where we can save data */ const file = fs.createWriteStream(dest); /* Using Promises so that we can use the ASYNC AWA... Add solution -
Javascript 2021-10-05 05:46:02
simulate schrool event puppeter
const autoScroll = async (page) => { await page.evaluate(async () => { await new Promise((resolve, reject) => { let totalHeight = 0 let distance = 100 let timer = setInterval(() => { let scrollHeight = document.... Add solution -
Javascript 2021-09-22 17:54:02
javascript node await .click
(async () => { const browser = await puppeteer.launch({headless: true}) const page = await browser.newPage() await page.goto('https://github.com/login') await page.type('#login_field', process.env.GITHUB_USER) await page.type('#password', process.... Add solution -
Javascript 2021-09-22 17:25:03
fill form using Puppeteer
const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://www.google.com/admin'); await page.type('#username', '[email protected]'); await ... Add solution -
Javascript 2021-09-22 13:25:02
express example using puppeteer
require('dotenv/config') const puppeteer = require('puppeteer') (async () => { try { const browser = await puppeteer.launch({ headless: false, args: [ '--allow-external-pages', '--allow-third-party-modules', '--data-reduction-prox... Add solution