Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defines an user-agent for the browser #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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