Visual Studio Code not reading html5lib
I am using bs4
in VS Code, along with html5lib
, but VS Code is indicating that it does not exist (I installed it using the command prompt).
import requests
from bs4 import BeautifulSoup
URL = " "
r = requests.get(URL)
soup = BeautifulSoup(r.content, 'html5lib')
print(soup.prettify())
Usually, ModuleNotFound error was caused by incorrect python interpreter if you have installed the package.
You can use shortcuts Ctrl+Shift+P and search for "Python: Select Interpreter" to choose the python interpreter which you install your python package in.