import re


def more_pages(soup, text):
    """ Checks if there is is a link with the text in it (usually something like
        "more" or "next page".) Returns the link if it exists, or None if it doesn't.
    """

    results = soup.findAll(text=re.compile(r'{}'.format(text)))

    for r in results:
        parent = r.parent

        if parent and parent.name == 'a':
            return parent['href']
    return None