Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.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漂亮的汤提取数据_Python_Beautifulsoup - Fatal编程技术网

python漂亮的汤提取数据

python漂亮的汤提取数据,python,beautifulsoup,Python,Beautifulsoup,我正在使用漂亮的Soup4.0解析一个html文档 下面是文档中表格的一个示例 <tr> <td class="nob"></td> <td class="">Time of price</td> <td class=" pullElement pullData-DE000BWB14W0.teFull">08/06/2012</td> <td class=" pullElement pullData-DE0

我正在使用漂亮的Soup4.0解析一个html文档

下面是文档中表格的一个示例

<tr>
<td class="nob"></td>
<td class="">Time of price</td>
<td class=" pullElement pullData-DE000BWB14W0.teFull">08/06/2012</td>
<td class=" pullElement pullData-DE000BWB14W0.PriceTimeFull">11:43:08&nbsp;</td>
<td class="nob"></td>
</tr>
<tr>
<td class="nob"></td>
<td class="">Daily volume (units)</td>
<td colspan="2" class=" pullElement pullData-DE000BWB14W0.EWXlume">0</td>
                <td class="nob"></td>
<t/r>
我得到一个需要整理的数据列表

有什么简单的建议吗

多谢各位

list(soup.stripped_strings)

将为您提供该汤中的所有字符串(删除所有尾随空格)

您有表格格式的字符串-您从那里尝试了什么?@yeback,19个问题和两个公认的答案。我可能不再回答这个问题了one@Mike:谁在乎答案是否被接受?叶巴赫:你的问题是什么?你发布的代码有效。这还不够简单吗?
list(soup.stripped_strings)