changed code for python 3.3 and bs4. fixed exception error and unicode bug