def get_option_text(elem):
    """ Get the text of option
        <option value="foo">bar</option> => "bar"
        <option>bar</option> => "bar"
        :param elem: a soup element
    """
    return elem.text.strip()