import requests


def is_website_online(path, timeout):
    """
    Checks wether a given website is currently online. To do that, it reads the
    HTTP status code. However, you could also add addidtional checks, e. g. testing
    if a specific text is returned.

    Parameters
    ----------
    - path : str
        exact path which should be checked
    - timeout : float
        after `timeout` seconds without answer, a website is considered offline

    Returns
    -------
    `True` if the website could be reached with the given path and returned HTTP Code `200`.
    """
    try:
        response = requests.get(path, timeout=timeout)
        return response.status_code == 200
    except:
        return False