genre_explorer/genres/genres_scraper.py
def create_genres_dictionary():
    """
    Returns a dictionary of genres where the keys are the alphabet and the values
    a list of genres
    :params list_of_genres - list
    """
    list_of_genres = _get_list_of_genre_from_links()
    
    genres = {k: [] for k in LIST_OF_LETTERS}
    
    for genre in list_of_genres:
        if 'Sections' in genre or 'Section' in genre:
            list_of_genres.remove(genre)
        if genre[0] in genres:
            genres[genre[0]].append(genre)
            genres[genre[0]].sort()
        else:
            genres["#"].append(genre)
            genres["#"].sort()
    
    
    return genres

    Returns a dictionary of genres where the keys are the alphabet and the values
    a list of genres
    :params list_of_genres - list
    
Returns a dictionary of genres where the keys are the alphabet and the values
a list of genres
:params list_of_genres - list
Returns a dictionary of genres where the keys are the alphabet and the values a list of genres : params list_of_genres - list
def create_genres_dictionary():
    list_of_genres = _get_list_of_genre_from_links()
    genres = {k: [] for k in LIST_OF_LETTERS}
    for genre in list_of_genres:
        if 'Sections' in genre or 'Section' in genre:
            list_of_genres.remove(genre)
        if genre[0] in genres:
            genres[genre[0]].append(genre)
            genres[genre[0]].sort()
        else:
            genres["#"].append(genre)
            genres["#"].sort()
    return genres
def create_genres_dictionary ( ) : list_of_genres = _get_list_of_genre_from_links ( ) genres = { k : [ ] for k in LIST_OF_LETTERS } for genre in list_of_genres : if 'Sections' in genre or 'Section' in genre : list_of_genres . remove ( genre ) if genre [ 0 ] in genres : genres [ genre [ 0 ] ] . append ( genre ) genres [ genre [ 0 ] ] . sort ( ) else : genres [ "#" ] . append ( genre ) genres [ "#" ] . sort ( ) return genres
Returns a dictionary of genres where the keys are the alphabet and the values
a list of genres
:params list_of_genres - list
Returns a dictionary of genres where the keys are the alphabet and the values a list of genres : params list_of_genres - list
"""
    Returns a dictionary of genres where the keys are the alphabet and the values
    a list of genres
    :params list_of_genres - list
    """