def extract_pagination_info(tree):
    """Given goodread's API response extract pagination info."""
    reviews_tag = tree.find('reviews')

    # if those attributes are not integers, there's more serious problem
    start = int(reviews_tag.attrib['start'])
    end = int(reviews_tag.attrib['end'])
    total = int(reviews_tag.attrib['total'])

    return start, end, total