-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
24 lines (22 loc) · 1.02 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import string
HEADLESS = False
INSTA_URL = 'https://www.instagram.com/'
COOKIE_FILE = 'cookies.json'
LOG_FILE = 'logs/insta_bot.log'
INSTA_USERNAME_FIELD = 'username'
INSTA_PASSWORD_FIELD = 'password'
INSTA_SUBMIT_BUTTON = 'button[type="submit"]'
INSTA_SEARCH_BUTTON = 'svg[aria-label="Search"]'
INSTA_SEARCH_INPUT = 'input[aria-label="Search input"]'
INSTA_SEARCH_ITEM = "//div[normalize-space()='{query}']"
INSTA_SEARCH_ITEM_v2 = "//span[normalize-space()='{query}']"
INSTA_PROFILE_MESSAGE_BUTTON = "//div[text()='Message']"
INSTA_MESSAGE_BOX = 'textarea[placeholder="Message..."]'
INSTA_MESSAGE_BOX_V2 = "//*[contains(text(), 'Message...')]"
INSTA_NOT_NOW_BUTTON = f"//button[contains(translate(text(), '{string.ascii_uppercase}', '{string.ascii_lowercase}'), 'not now')]"
INSTA_HASHTAG_POST_LIST = '//article//a//div//img'
INSTA_LIKE_SVG = 'svg[aria-label="Like"]'
INSTA_UNLIKE_SVG = 'svg[aria-label="Unlike"]'
INSTA_RELATIVE_BUTTON = './ancestor::button'
INSTA_COMMENT_BOX = 'form textarea'
INSTA_CLOSE_BUTTON = 'svg[aria-label="Close"]'