<jupyter_start><jupyter_text>Innovation Group Statistics Refresher Let's import all necessary **libraries**!<jupyter_code>from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import schedule
import time<jupyter_output><empty_output><jupyter_text>**First step** is to execute the **Selenium driver** for the browser used, in this case it's Chorme (the path of the file is needed in order to execute it). **After** we need to acces the **URL** where the live team production statistics are displayed and wait 10 seconds for the page loading.<jupyter_code>driver = webdriver.Chrome('local/user/desktop/chromdriver.exe')

driver.get("http://innovationgroup.com/prductionstats")

time.sleep(10)<jupyter_output><empty_output><jupyter_text>**Next step** is to find with Selenium the **'username'** and **'password'** fields and type the info in. We also have to look out for the adequate button ID to **validate the credentials** and click it.<jupyter_code>username = driver.find_element_by_id("username")
password = driver.find_element_by_id("password")

username.send_keys("YourUsername")
password.send_keys("PassworD")

driver.find_element_by_name("submit").click()<jupyter_output><empty_output><jupyter_text>We define here then the Selenium **Function** that will refresh our desired URL and **schedule** it to refresh every 1 minute.<jupyter_code>def func():
    driver.refresh()

schdule.every(1).minutes.do(func)<jupyter_output><empty_output><jupyter_text>Finally a **loop** is created in order to run the schedule function **non-stop**. Quiting the script will be done manually when the working day is over.<jupyter_code>while True:
    schdule.run_pending()
    time.sleep(1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10848240046162723, 'fraction_numerical': 0.004039238315060588, 'mean_word_length': 6.917808219178082, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '241042', 'license': 'Unlicense', 'n_tokens_mistral': 538, 'n_tokens_neox': 515, 'n_words': 165, 'path': 'python_projects/refresher/ig_tvstats_refresher.ipynb', 'repo_name': 'axeldp/axeldp.github.io', 'size': '1733'}