def extract_current_page(tree):
    """
    Helper function to extract the current page number of the page of advisors
    from a HTMLElement (lxml)
    """
    selector = '//ul[@class="pagination"]/li[@class="current"]/span/text()'
    result = tree.xpath(selector)
    return 1 if len(result) == 0 else int(result[0])