-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
22 lines (21 loc) · 966 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let driver = require('./util/browser/browser');
const logger = require('./util/logger/logger');
const { userName, baseUrl } = require('./config/config');
const { saveCookies, restoreCookies } = require('./util/cookies/cookies');
const { acceptCookies } = require('./util/actions/acceptCookies');
const { getPage, reloadPage } = require('./util/actions/pageNavigation');
const { openProfile } = require('./util/profile/profile');
const { fillAndLogin } = require('./util/actions/login');
const { followPostsLikers } = require('./util/actions/follow');
getPage(driver, baseUrl)
.then(() => restoreCookies(driver))
.then(() => reloadPage(driver))
.then(() => acceptCookies(driver))
.then(() => fillAndLogin(driver))
.then(() => saveCookies(driver))
.then(() => openProfile(driver, userName))
.then(() => followPostsLikers(driver))
.then(() => logger.log({
level: 'info',
message: 'Instabot JS tasks finished.',
}));