Update Peoples Gas scraper login flow
This commit is contained in:
parent
a250e2d88e
commit
c5e63543c6
|
|
@ -62,11 +62,11 @@ async function runScrapers(credentials) {
|
|||
try {
|
||||
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36');
|
||||
|
||||
await page.goto('https://www.peoples-gas.com/login', { waitUntil: 'networkidle2' });
|
||||
await page.goto('https://peopleseaccount.com/Portal/default.aspx', { waitUntil: 'networkidle2' });
|
||||
|
||||
await page.waitForSelector('#username, input[name="username"]', { timeout: 15000 });
|
||||
await page.type('#username, input[name="username"]', credentials.peoplesGas.username);
|
||||
await page.type('#password, input[name="password"]', credentials.peoplesGas.password);
|
||||
await page.waitForSelector('#txtLogin, input[name="txtLogin"]', { timeout: 15000 });
|
||||
await page.type('#txtLogin, input[name="txtLogin"]', credentials.peoplesGas.username);
|
||||
await page.type('#txtpwd, input[name="txtpwd"]', credentials.peoplesGas.password);
|
||||
|
||||
await Promise.all([
|
||||
page.waitForNavigation({ waitUntil: 'networkidle2' }),
|
||||
|
|
|
|||
Loading…
Reference in New Issue