Skip to content

Commit

Permalink
fixing error throw
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Feb 5, 2024
1 parent 5ea1e91 commit acac84c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ async function getScreenshot() {
await page.setViewport({ width: 1920, height: 1080 })
await page.goto("https://www.twitch.tv/" + config.twitch.channels, { waitUntil: 'networkidle0' })

await page.$eval('button[data-a-target="consent-banner-accept"]', el => el.click())
await page.$eval('button[data-a-target="content-classification-gate-overlay-start-watching-button"]', el => el.click())
await page.$eval('button[data-a-target="consent-banner-accept"]', el => el.click()).catch(() => {})
await page.$eval('button[data-a-target="content-classification-gate-overlay-start-watching-button"]', el => el.click()).catch(() => {})

await page.waitForSelector('div.persistent-player')
await page.$eval('.video-player__default-player', el => el.remove())
Expand Down

0 comments on commit acac84c

Please sign in to comment.