from bs4 import BeautifulSoup


def get_scripts(html: str, src: bool = False):
    """
    This function searches for all the script tags within the page html and
    returns a list of of enumerated script tags.

    @param html: The source html of the page.
    @type html: str
    @param src: Should we search for script tags with src attribute. Defaults to False (optional).
    @type src: bool
    @return: The enumerated list of script tags.
    @rtype: list
    """
    soup = BeautifulSoup(html, "html.parser")
    source_scripts = soup.find_all("script", src=src)
    return list(enumerate(source_scripts))