Skip to content

Commit

Permalink
use docker defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Feb 5, 2024
1 parent f3450fc commit 89fec3f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions services/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ require('mathjs')

async function getScreenshot() {
try {
const browser = await puppeteer.connect({ browserWSEndpoint: `wss://${config.browserlessUrl}?launch={"headless":"new"}` })
const browser = await puppeteer.connect({ browserWSEndpoint: `wss://${config.browserlessUrl}` })
const page = await browser.newPage()
const session = await page.target().createCDPSession()
await session.send("Page.enable")

await page.setViewport({ width: 1920, height: 1080 })

await page.goto("https://www.twitch.tv/" + config.twitch.channels, { waitUntil: 'networkidle0' })
await page.waitForSelector('div.persistent-player')
await page.$eval('.video-player__default-player', el => el.remove())
Expand Down

0 comments on commit 89fec3f

Please sign in to comment.