|
发表于 2019-6-2 17:40:40
|
显示全部楼层
在pycharm运行报错 :
UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). 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 84 of the file D:/pycharm项目/fengzhuang.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.
h1_soup = BeautifulSoup(html1) # 主页
Traceback (most recent call last):
File "D:/pycharm项目/fengzhuang.py", line 124, in <module>
main()
File "D:/pycharm项目/fengzhuang.py", line 84, in main
h1_soup = BeautifulSoup(html1) # 主页
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\bs4\__init__.py", line 245, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len() |
|