A lot of this code will appear in the Python Network data acquisition book:
1 from Import Urlopen 2 from Import BeautifulSoup 3 html = urlopen (URL)4 bsobj = BeautifulSoup (HTML)
I also followed the entry of this section of code, but the prompt appears:
Userwarning:no parser was explicitly specified, so I ' m using the best available HTML parser for this system ("Html.parser "). This usually isn ' t a problem, but if you run the this code on another system, or in a different virtual environment, it may us e a different parser and behave differently.
The code that caused this warning are on line 1 of the file <string>. To get rid of the This warning, the change code is looks like this:
BeautifulSoup (Your_markup})
To this:
BeautifulSoup (Your_markup, "Html.parser")
According to the prompt, this will be bsobj = BeautifulSoup (HTML), instead of bsobj = BeautifulSoup (HTML, "Html.parser") on the line.
Python Network data Acquisition code update