Skip to content

Instantly share code, notes, and snippets.

@tahasonmez
Created August 26, 2019 19:26
Show Gist options
  • Save tahasonmez/0ed94b2e5778172da7c3f5fd34af1ddd to your computer and use it in GitHub Desktop.
Save tahasonmez/0ed94b2e5778172da7c3f5fd34af1ddd to your computer and use it in GitHub Desktop.
Bahçeşehir Üniversitesi Öğrenci İşleri Daire Başkanlığı duyuru sayfası duyuru kontrolü
from selenium import webdriver
import os
import sched, time
driver_path = "/Users/tahasonmez/Downloads/chromedriver"
driver = webdriver.Chrome(executable_path=driver_path)
driver.get('https://bau.edu.tr/idari-birimler/daire-baskanliklari/ogrenci-isleri-daire-baskanligi')
def announce():
time.sleep(2)
driver.refresh()
labels = driver.find_elements_by_xpath("/html/body/section[2]/div/div/div[2]/div")
for label in labels:
if "Yatay" in label.text and "26/08/2019" in label.text:
os.system('say "DUYURU YAPILDI!"')
os.system('afplay /Users/tahasonmez/Downloads/hornalert.m4a')
while True:
announce()
time.sleep(300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment