This repository has been archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (54 loc) · 2.17 KB
/
main.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
54
55
56
57
58
59
60
61
62
63
64
65
66
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
import sys
from termcolor import colored, cprint
import os
with open('Şifre/username.txt', 'r') as file:
username = file.read().replace('\n', '')
with open('Şifre/password.txt', 'r') as file:
password = file.read().replace('\n', '')
url = "https://giris.eba.gov.tr/EBA_GIRIS/giris.jsp"
clear = lambda: os.system('cls')
print_yesil = lambda x: cprint(x, 'green')
print_sari = lambda x: cprint(x, 'yellow')
clear()
print('--------------------------------------------------------------')
print(' Uygulamayı Kullandığınız İçin Teşekkürler!')
print('Bu Uygulamayı Kullanarak Yasal Şartları Kabul Etmiş Olursunuz.')
print_yesil(' ReXulEc // rexulec.com')
print('--------------------------------------------------------------')
sleep(3)
clear()
print('--------------------------------------------------------------')
print(' Orjinal Proje Aşağıdadır, Destekleriniz İçin Teşekkürler')
print_sari(' https://github.com/ReXulEc/eba-canli-ders-bot')
print_yesil(' ReXulEc // rexulec.com')
print('--------------------------------------------------------------')
sleep(3)
options = webdriver.ChromeOptions()
options.binary_location = r"C:\Program Files\Google\Chrome\Application\chrome.exe"
chrome_driver_binary = r"Driver\chromedriver"
driver = webdriver.Chrome(chrome_driver_binary, chrome_options=options)
driver.get(url)
driver.find_element_by_name("tckn").send_keys(username)
driver.find_element_by_name("password").send_keys(password)
driver.find_element_by_css_selector(".nl-form-send-btn").click()
sleep(2)
while True:
try:
if driver.find_element_by_id("joinMeeting").click():
print_yesil('--- Ders Başladı! ---')
break
else:
print_yesil('--- Ders Başladı!! ---')
print_yesil('--- Butona Basıldı ---')
sleep(2)
continue
except Exception:
print_sari('Buton Bulunamadı, Hala Aranıyor...')
sleep(2)
continue