import re


def get_genres_from_soup(soup):
    """Get the genres of a book.

    Parameters
    ----------
    soup : BeautifulSoup
        BeautifulSoup object created from a book page.

    Returns
    -------
    list
        Book genres.
    """
    genres_elements = soup.find_all('a', {'href': re.compile('/genres/')}, class_='bookPageGenreLink')
    return list(map(lambda element: element.get_text(), genres_elements))