from bs4 import BeautifulSoup
from selenium import webdriver
#import urllib2
import time
driver = webdriver.Chrome()
driver.maximize_window()
driver.get("https://www.zillow.com/homes/recently_sold/Culver-City-CA/house,condo,apartment_duplex,townhouse_type/20432063_zpid/51617_rid/12m_days/globalrelevanceex_sort/34.048605,-118.340178,33.963223,-118.47785_rect/12_zm/")
time.sleep(3)
driver.find_element_by_class_name("collapsible-header").click()
soup = BeautifulSoup(driver.page_source,"lxml")
region = soup.find("div",{"id":"hdp-price-history"})
table = region.find('table',{'class':'zsg-table yui3-toggle-content-minimized'})
print table
我嘗試在zillow中取消稅/表格價格,但是我得到的結果是無。我如何得到那張桌子? 如何在zillow中取消價格/稅表歷史記錄?
你幫了我很多!非常感謝 ! –
很高興能幫到你!不要忘記點擊上/下按鈕上的灰色勾號來選擇一個答案作爲接受的解決方案。 –