【发布时间】:2016-02-16 15:06:30
【问题描述】:
给定一个包含元素列表的页面,例如<input> 元素,它们都有一个共同的类,例如category-checkbox,如何使用 beautifulsoup 将所有这些元素的值提取到列表中?例如:
<input type="checkbox" class="category-checkbox" value="apples" />
<input type="checkbox" class="category-checkbox" value="pears" />
<input type="checkbox" class="category-checkbox" value="oranges" />
【问题讨论】:
标签: python html list python-3.x beautifulsoup