genre_explorer/genres/genres_scraper.py
def _get_links_to_sections_of_genres():
    """
    Returns a list of links to the different sections of genres in wikipedia
    """
    page_text = requests.get("https://en.wikipedia.org/wiki/List_of_music_styles")
    try:
        page_text.raise_for_status
    except Exception as exc:
        print("There was a problem")
        
    page_text = page_text.text
    bs_obj = bs4.BeautifulSoup(page_text, "html.parser")
    links_to_genres = bs_obj.findAll(href=re.compile("List_of_styles_of_music:_[A-Z].[A-Z]"))
    links = []
    for i in links_to_genres:
        links.append("https://en.wikipedia.org" + i.get("href"))
        
    return links

    Returns a list of links to the different sections of genres in wikipedia
    
Returns a list of links to the different sections of genres in wikipedia
Returns a list of links to the different sections of genres in wikipedia
def _get_links_to_sections_of_genres():
    page_text = requests.get("https://en.wikipedia.org/wiki/List_of_music_styles")
    try:
        page_text.raise_for_status
    except Exception as exc:
        print("There was a problem")
    page_text = page_text.text
    bs_obj = bs4.BeautifulSoup(page_text, "html.parser")
    links_to_genres = bs_obj.findAll(href=re.compile("List_of_styles_of_music:_[A-Z].[A-Z]"))
    links = []
    for i in links_to_genres:
        links.append("https://en.wikipedia.org" + i.get("href"))
    return links
def _get_links_to_sections_of_genres ( ) : page_text = requests . get ( "https://en.wikipedia.org/wiki/List_of_music_styles" ) try : page_text . raise_for_status except Exception as exc : print ( "There was a problem" ) page_text = page_text . text bs_obj = bs4 . BeautifulSoup ( page_text , "html.parser" ) links_to_genres = bs_obj . findAll ( href = re . compile ( "List_of_styles_of_music:_[A-Z].[A-Z]" ) ) links = [ ] for i in links_to_genres : links . append ( "https://en.wikipedia.org" + i . get ( "href" ) ) return links
Returns a list of links to the different sections of genres in wikipedia
Returns a list of links to the different sections of genres in wikipedia
"""
    Returns a list of links to the different sections of genres in wikipedia
    """