-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
33 lines (25 loc) · 1.03 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const puppeteer = require('puppeteer');
const instagram = require('./instagram');
let username = '';
let password = '';
(async() => {
//await instagram.initialize();
try {
await instagram.login(username, password);
//await instagram.end();
} catch (e) {
console.log(e);
}
// const browser = await puppeteer.launch({ headless: false });
// const page = await browser.newPage();
// await page.goto('https://www.instagram.com/');
// // await page.waitFor('a[href="/accounts/login/?source=auth_switcher"]');
// // await page.click('a[href="/accounts/login/?source=auth_switcher"]');
// await page.waitFor(100);
// await page.waitFor('input[name="username"]');
// await page.type('input[name="username"]', '', { delay: 20 });
// await page.type('input[name="password"]', '', { delay: 20 });
// await page.click('#react-root > section > main > div > article > div > div:nth-child(1) > div > form > div:nth-child(4) > button');
debugger;
//await browser.close();
})();