Fixed #17 and using logging module.

I only tested it with BeautifulSoup4.