我正在制作一个应用程序,从apartments.com创建一个公寓的csv。我正在使用beautiful soup,几乎拥有所有必要的信息,但当我搜索地址时,我不断得到一些信息 下面是一个例子
<div class="location" title="123 jolly ln, north pole, AK 00001"> 123 jolly ln, north pole, AK 00001 </div>
我正在尝试的代码是
from bs4 import BeautifulSoup as soup
addr = soup.find("div", class_="location")
print(addr)
但我从中一无所获
它应该可以为您找到地址:
相关问题 更多 >
编程相关推荐