You have to mention an HTML parser with BeautifulSoup. You can use either 'lxml' or 'html5lib'.
Make the following change in your code and it should work.
request = urllib.request.Request(url, None, headers)
response = urllib.request.urlopen(request)
soup = BeautifulSoup(response, 'html5lib')
If 'lxml' or 'html5lib' is not installed on your system, you can install using the following commands:
$ pip install html5lib
$ pip install lxml
You can find details about BeautifulSoup here.