from typing import List


def _get_href(
    a: list,
    url: str
) -> List[str]:
    """Get href from <a></a> elements as list.

    Parameters
    ----------
    a : list
        The list of html a objects.
    url : str
        The url which is loaded.

    Returns
    -------
    List[str]
        A list of strings containing the urls on the webpage.

    Notes
    -----
    If the href element is not a valid url, then the href element is
    appended to the given url.

    """
    href = []
    for _a in a:
        # if no href attribute is given in the tag, the initial url is returned
        _href = _a.get("href", url)
        if "https" in _href:
            href.append(_href)
        else:
            href.append(url + _href)
    return href