嗨,我有下面的桌子,我想擦一下:
https://www.footballdb.com/players/current.html?letter=B
我尝试使用以下代码进行刮取:
df= pd.DataFrame()
site= 'https://www.footballdb.com/players/current.html?letter=B'
df = pd.read_html(site)
但是,我得到了一个错误:
ValueError: No tables found
有人能解决这个错误吗
我可以看到div class = "divtable divtable-striped"
但是不确定如何提取
任何帮助都将不胜感激!谢谢
页面上没有
table
元素。所以,熊猫找不到它。您需要选择table div。因此,我建议您选择BeautifulSoup相关问题 更多 >
编程相关推荐