|
发表于 2019-3-27 23:50:15
|
显示全部楼层
Warning (from warnings module):
File "C:\Python35\lib\bs4\__init__.py", line 181
markup_type=markup_type))
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 this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 1 of the file <string>. To get rid of this warning, change code that looks like this:
BeautifulSoup([your markup])
to this:
BeautifulSoup([your markup], "html.parser")
Traceback (most recent call last):
File "E:/Python/huangchong.py", line 116, in <module>
main()
File "E:/Python/huangchong.py", line 78, in main
h1_soup = BeautifulSoup(html1)#主页
File "C:\Python35\lib\bs4\__init__.py", line 192, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len() |
|