I am attempting to scrap a website but BeautifulSoup is kicking me an error. I am not sure what is causing the error Bs4 and html5lib are installed. Does anyone have an idea here?
Python Code
from bs4 import BeautifulSoup
import requests
url = 'http://www.transtats.bts.gov/Data_Elements.aspx?Data=1r'
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html,"html5lib")
print (soup.prettify())
Python Error
runfile('C:/WebsiteGrab.py', wdir=;'somepath')
Traceback (most recent call last):
File "<ipython-input-1-fc28ecb678ac>", line 1, in <module>
runfile('C:/Users/bartogre/Desktop/WebsiteGrab.py', wdir='C:/Users/bartogre/Desktop')
File "C:\Program Files (x86)\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)
File "C:\Program Files (x86)\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/bartogre/Desktop/WebsiteGrab.py", line 12, in <module>
soup = BeautifulSoup(html,"html5lib")
File "C:\Program Files (x86)\Anaconda3\lib\site-packages\bs4\__init__.py", line 165, in __init__
% ",".join(features))
FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?