<td class="left " data-append-csv="adamja01" data-stat="player" csk="Adam,Jason0.01"><a href="/players/a/adamja01.shtml">Jason Adam</a></td>
这是我目前掌握的密码。。。我想亚当,杰森导入excel。他的名字好像在“csk”里。任何建议都会非常有用。谢谢!你知道吗
from urllib.request import urlopen
from bs4 import BeautifulSoup
content = urlopen("https://www.baseball-reference.com/leagues/MLB/2018-standard-pitching.shtml")
soup = BeautifulSoup(content.read(),"lxml")
tags = soup.findAll('div')
for t in tags:
print(t)
使用
lxml
会更快:尝试下面的脚本来获取它们。您愿意获取的数据包含在注释中,这就是为什么通常的方法不允许您收集这些数据:
相关问题 更多 >
编程相关推荐