import re


def get_type_from_weblink(weblink):
    """Get the item's type from a weblink."""
    pattern = '\/([a-z]*)\.xhtml'
    matches = re.findall(pattern, weblink.lower())
    return matches[0]