Skip to content

Commit

Permalink
Defines an user-agent for the browser
Browse files Browse the repository at this point in the history
From PR28 (viniciusgava#28)
  • Loading branch information
ludufre committed May 27, 2024
1 parent f49415b commit 6a60fc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions itauscraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const os = require('os')

const stepLogin = async (page, options) => {
// Open homepage and fill account info
console.log('Configuring user-agent...')
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36')
await page.waitForTimeout(300)
console.log('Opening bank homepage...')
console.debug('Itaú url:', options.itau.url)
await page.goto(options.itau.url)
Expand Down

0 comments on commit 6a60fc7

Please sign in to comment.