def scrape_page_number(soup):
    """Scrapes the page number from an Archive-It results page stored in the
    BeautifulSoup object `soup`.
    """
    try:
        pagestring = soup.find_all('div', 'paginator')[0].text
        print('pagestring: {}'.format(pagestring))
        page_number = pagestring.split('of')[0].strip().split()[1]
        page_number = page_number.replace(',', '')
    except IndexError:
        page_number = None
    return page_number
