网络刮擦表显示没有结果
我想从
但是,我没有任何结果.find_all()
也没有得到任何结果.xpath()
import requests
from bs4 import BeautifulSoup
page = requests.get('https://paperswithcode.com/sota/3d-object-detection-on-kitti-cars-moderate')
soup = BeautifulSoup(page.text, 'html.parser')
soup.find_all('table')
# out: []
import requests
import lxml.html as lh
page = requests.get('https://paperswithcode.com/sota/3d-object-detection-on-kitti-cars-moderate')
doc = lh.fromstring(page.content)
doc.xpath('//*[@id="leaderboard"]/div[3]/table')
# out: []
有什么问题?如何获得正确的结果?
I want to scrape the main table from this page.
However, I don't get any results neither with .find_all()
nor with .xpath()
import requests
from bs4 import BeautifulSoup
page = requests.get('https://paperswithcode.com/sota/3d-object-detection-on-kitti-cars-moderate')
soup = BeautifulSoup(page.text, 'html.parser')
soup.find_all('table')
# out: []
import requests
import lxml.html as lh
page = requests.get('https://paperswithcode.com/sota/3d-object-detection-on-kitti-cars-moderate')
doc = lh.fromstring(page.content)
doc.xpath('//*[@id="leaderboard"]/div[3]/table')
# out: []
What's the problem and how do I get the correct result?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于网页不是动态的,因此您可以在脚本块中找到表。
输出:
Because the webpage is not dynamic, you can find table in script block.
OUTPUT: