我正在用BeautifulSoup
刮this URL。你知道吗
我想在我们的功能标题之后,把每个DIV都刮下来:
if hotel_meetings_soup.select("div#contentArea div.highlightBox"):
print(hotel_meetings_soup.select("div#contentArea")) # debug 1
exit(0)
for meeting in hotel_meetings_soup.select("div#contentArea div.highlightBox"):
print("\n Feature start here\n")
print(meeting)
# Rest of code
所有的DIV都有相同的类highlightBox
,但是我不知道为什么debug 1
只打印具有
Number Of Guest Rooms: 500
Number Of Meeting Spaces: 29
Largest Meeting Space: 17,377 sq ft (1,614.28 sq.m)
但不是其他人。你知道吗
其思想是,首先通过文本找到} 找到适当的下一个同级:
Our Features
h3
元素,然后使用^{印刷品:
相关问题 更多 >
编程相关推荐