-
Notifications
You must be signed in to change notification settings - Fork 0
/
connect.py
53 lines (40 loc) · 1.25 KB
/
connect.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
from csv import reader
import time
from login import Login
from login import driver
from selenium.webdriver.common.by import By
import random
name = input('\nInsert name of the database... ')
db = open(name+'.csv')
data = list(reader(db))
Login()
def Connect():
try:
time.sleep(3)
send_button = driver.find_element(by=By.ID, value='ember264')
send_button.click()
except:
menu_button = driver.find_element(by=By.ID, value='ember67')
menu_button.click()
time.sleep(3)
connect_button = driver.find_element(by=By.ID, value='ember73')
connect_button.click()
time.sleep(3)
send_button = driver.find_element(by=By.ID, value='ember264')
send_button.click()
else:
print('Already connected!')
connect_button = driver.find_element(by=By.CLASS_NAME, value='pvs-profile-actions ')
connect_button = driver.find_element(by=By.CLASS_NAME, value='pvs-profile-actions__action')
connect_button.click()
driver.get(data[12][0])
Connect()
for profile in data:
print(profile[0]+'...')
driver.get(profile[0])
time.sleep(3)
Connect()
ranint = random.randint(10,25)
print('Sleeping '+str(ranint)+' seconds...')
time.sleep(ranint)