def get_magnets(bs_html):
    """Gets magnet links from HTML
    
    Searches for the string "magnet" into attribute href of <a> tags from given HTML
    and returns the occurrences as a list
    
    Args:
        bs_html: beautiful soup parsed HTML
    """
    hrefs = list(map(lambda link: link.get('href'), bs_html.find_all('a')))
    return list(filter(lambda href: href.startswith('magnet'), hrefs))