def get_bookinfo_from_xpath(htmltree, xpath, special_characters = ["\n", "\t", ",", "'", "-", ":", ";", "(", ")", ".", "?", '\r']): 
    """
    Returns information about the book's webpage using an htmltree,
    and an xpath to select the approriate web elemen. Removes any weird
    character from the obtained data.
    
    Params:
        htmltree: parsed html page
        xpath: xpath query
        
    returns string of book info
    """
    
    #Use .xpath to get the selected webelement using the xpath
    info = htmltree.xpath(xpath)
    info = "".join(info) #flatten the list
    
    #Loop through every special character and remove each
    for char in special_characters:
        info = info.replace(char, '')
    
    return info