def get_author_name(soup):
    """Get the author's name from its main page.

    Args:
        soup (bs4.element.Tag): connection to the author page.

    Returns:
        string: name of the author.

    Examples::
        >>> from scrapereads import connect
        >>> url = 'https://www.goodreads.com/author/show/1077326'
        >>> soup = connect(url)
        >>> get_author_name(soup)
            J.K. Rowling

    """
    author_h1 = soup.find('h1', attrs={'class': 'authorName'})
    return author_h1.find('span').text