repl.it
@Kognise/

SiteStealer OOF

Nodejs

No description

fork
loading
Files
  • index.js
  • package-lock.json
  • package.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
console.log('> Loading modules...')
const puppeteer = require('puppeteer')

;(async () => {
  console.log('> Loading browser...')
  const browser = await puppeteer.launch({
    args: ['--no-sandbox']
  })

  console.log('> Loading page...')
  const page = await browser.newPage()
  await page.goto('https://example.com/')
  await browser.close()
})()

// app.get("/", async (request, response) => {
//   try {
    // const browser = await puppeteer.launch({
    //   args: ['--no-sandbox']
    // })
    // const page = await browser.newPage()
    // await page.goto('https://developers.google.com/web/tools/puppeteer')
    // await page.screenshot({path: __dirname+'/puppeteer.png'})
    // await browser.close()
//     response.sendFile(__dirname+'/puppeteer.png')
//   } catch (error) {
//     console.log(error)
//   }
// })

// var listener = app.listen(process.env.PORT, function () {
//   console.log('Your app is listening on port ' + listener.address().port)
// })
node v10.16.0