41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
|
#! /usr/bin/python3
|
||
|
from streamer import Streamer
|
||
|
import argparse
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
parser = argparse.ArgumentParser()
|
||
|
parser.add_argument("config", help="Path to config.ini file", default="config.ini")
|
||
|
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
streamer = Streamer(args.config)
|
||
|
streamer.stream()
|
||
|
exit(0)
|
||
|
|
||
|
omr = Youtube("UCIh6v7QDfo8FBYAifTMrD3A")
|
||
|
|
||
|
#Update driver
|
||
|
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
|
||
|
|
||
|
#Start kerkomroep
|
||
|
options = Options()
|
||
|
options.add_argument("start-maximized")
|
||
|
options.add_experimental_option("detach", True)
|
||
|
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
|
||
|
|
||
|
#Open livestream url
|
||
|
driver.get(omr.livestream_url())
|
||
|
|
||
|
driver.timeouts.implicit_wait = 3
|
||
|
|
||
|
# while True:
|
||
|
# try:
|
||
|
# button = driver.find_element(by=By.XPATH, value=omr.get_xpath())
|
||
|
# if button != None:
|
||
|
# break
|
||
|
# except:
|
||
|
# pass
|
||
|
# time.sleep(1)
|
||
|
|
||
|
# actionChains = ActionChains(driver)
|
||
|
# actionChains.move_to_element(button).click().perform()
|