def find_text(text: str, find_all, get: str):
    """
    Function to loop through the tags in find_all and
    return the desired one using the desired return format
    :param text: the text that will be searched for
    :param find_all: a find_all() from BeautifulSoup
    :param get: the desired format of return, e.g: text, link, etc.
    """
    for result in find_all:
        if result:
            if get == "text":
                if text.lower() in result.text.lower():
                    return result.text
            if get == "href":
                if text.lower() in result.text.lower():
                    if result["href"].startswith("/"):
                        return "https://www.curseforge.com" + result["href"]
                    else:
                        return result["href"]
        else:
            return "Unknown"