【发布时间】:2019-12-09 22:39:15
【问题描述】:
我正在尝试提取化学物质的名称、它的出现/用途以及通过使用美丽的汤添加的日期。 这是列表中化学品的一个示例 https://oehha.ca.gov/chemicals/abiraterone-acetate
有人可以帮我吗?非常感谢!
我的愿望输出将是
Abiraterone acetat from L253
<h1 class="title" id="page-title"><span class="ca-gov-icon-arrow-down"></span> Abiraterone acetate </h1>
A CYP17 inhibitor indicated in combination with prednisone for the treatment of patients with metastatic castration-resistant prostate cancer
from L265
<h3 class="label-above">Occurence(s)/Use(s)</h3><p>A CYP17 inhibitor indicated in combination with prednisone for the treatment of patients with metastatic castration-resistant prostate cancer.</p>
02/02/2016 from L266
<h3 class="label-above">Date Added</h3><span class="date-display-single" property="dc:date" datatype="xsd:dateTime" content="2016-02-02T00:00:00-08:00">02/02/2016</span> </div>
【问题讨论】:
-
您能否展示一下您尝试提取的化学物质名称?
-
temp = str(soup.find_all('p')) 我用它来查找化学物质的出现。但是事件没有出现
-
@RunyaoYin 被告知您正在处理
Incapsula防火墙,这将阻止任何尝试解析站点内容的尝试 -
@RunyaoYin 在下面查看我的答案
标签: python python-3.x beautifulsoup web-crawler