(fh)
return soup
Takes a file handler returns BeautifulSoup
Takes a file handler returns BeautifulSoup
Takes a file handler returns BeautifulSoup
def soup_maker(fh):
    """ Takes a file handler returns BeautifulSoup"""
    try:
        from bs4 import BeautifulSoup
        soup = BeautifulSoup(fh, "lxml")
        for tag in soup.find_all():
            tag.name = tag.name.lower()
    except ImportError:
        from BeautifulSoup import BeautifulStoneSoup
        soup = BeautifulStoneSoup(fh)
    return soup
def soup_maker ( fh ) : try : from bs4 import BeautifulSoup soup = BeautifulSoup ( fh , "lxml" ) for tag in soup . find_all ( ) : tag . name = tag . name . lower ( ) except ImportError : from BeautifulSoup import BeautifulStoneSoup soup = BeautifulStoneSoup ( fh ) return soup