Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python beautifulsoupxml解析奇怪的数字_Python_Beautifulsoup - Fatal编程技术网

Python beautifulsoupxml解析奇怪的数字

Python beautifulsoupxml解析奇怪的数字,python,beautifulsoup,Python,Beautifulsoup,所以我有一个xml文件,我正在用BeautifulSoup解析它 文件的顶部如下所示 <search_results count="1448"> <query>genentech</query> <!-- Additional study fields may be added over time --> <study rank="1"> <title>A Study in Participants Previously E

所以我有一个xml文件,我正在用BeautifulSoup解析它

文件的顶部如下所示

<search_results count="1448">
<query>genentech</query>
<!-- Additional study fields may be added over time -->
<study rank="1">
<title>A Study in Participants Previously Enrolled in a Genentech− and/or F. 
Hoffmann-La Roche Ltd-Sponsored Atezolizumab Study (IMbrella A)</title>
<recruitment open="Y">Not yet recruiting</recruitment>
<study_results>No Results Available</study_results>
<conditions>
<condition>Cancer</condition>
</conditions>
<interventions>
<intervention type="Drug">Atezolizumab</intervention>
</interventions>
<url>https://ClinicalTrials.gov/show/NCT03148418</url>
</study>

基因泰克
一项针对先前参加基因技术研究的参与者的研究− 和/或F。
Hoffmann La Roche有限公司赞助的阿替唑珠单抗研究(IMbrella A)
尚未招募
没有结果
巨蟹座
阿替唑珠单抗
https://ClinicalTrials.gov/show/NCT03148418
如何从中获取搜索结果计数?我试过soup.search\u results.count,没用。汤也不算


有人有什么想法吗?谢谢

试试汤怎么样?搜索结果['count']?天哪,太谢谢你了。我已经被困在这上面三个小时了