【发布时间】:2020-09-03 15:20:20
【问题描述】:
我正在尝试从此页面https://coronavirus.gob.mx/datos/ 中提取 COVID-19 的“确认”病例数
这是我的代码行table_div = soup.find('div', {"id": "gsPosDIV"}) 但不起作用,我真的是网络抓取的新手。
提取这些数据的正确形式是什么?
这是html
<div id="gsPosDIV" class="h5 mb-0 font-weight-bold text-gray-800">47,144</div
【问题讨论】:
-
你能贴出
html的代码吗? -
将您的代码放入 setTimeut 并让它等待几秒钟,同时页面加载
-
当然是的47,144
标签: python web-scraping beautifulsoup