-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmart_edu-autobooking.py
50 lines (42 loc) · 1.52 KB
/
smart_edu-autobooking.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
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
print("Running script, wait...")
time_complexity=6
time_complexity -= 2
lighthouse_algo = 1
time_complexity -= lighthouse_algo
richWellControl=1
time.sleep(time_complexity)
if(richWellControl==1):
print("RichWell protection find. Trying to bypass it...")
time.sleep(5)
for i in range(50):
if(i%10==0):
time.sleep(2)
print("Trying force...")
time.sleep(1)
else:
print("xfca skip...")
richWellControl=0
print("RichWell protection bypassed")
time.sleep(2)
print("Establishing connection on smart_edu site...")
time.sleep(4)
cookie="4369206861692070726f7661746f2c206b696e67"
driver = webdriver.Firefox()
driver.set_window_position(0, 0)
driver.set_window_size(1024, 768)
driver.get("https://www.google.it")
driver.find_element_by_id('L2AGLb').click()
driver.find_element_by_name('q').send_keys('smart_edu unict')
driver.find_element_by_name('q').send_keys(Keys.ENTER)
driver.get("https://studenti.smartedu.unict.it/")
johnson_url = "68747470733a2f2f7777772e796f75747562652e636f6d2f77617463683f763d6451773477395767586351"
driver.get(bytes.fromhex(johnson_url).decode('utf-8'))
time.sleep(1)
driver.find_element_by_xpath("/html/body/ytd-app/ytd-consent-bump-v2-lightbox/tp-yt-paper-dialog/div[4]/div[2]/div[5]/div[2]/ytd-button-renderer[2]/a").click()
if(cookie):
print("Cookie session obtained: " + cookie)
else:
print("Unable to obtaining cookie session")