我想解析this site和我無法理解的原因,什麼都沒有發生。Beautifulsoup不工作在一個特定的網站
url = 'http://www.zap.com.br/imoveis/rio-de-janeiro+rio-de-janeiro/apartamento-padrao/venda/'
response = urllib2.urlopen(url).read()
doc = BeautifulSoup(response)
divs = doc.findAll('div')
print len(divs) # prints 0.
此網站是在巴西里約熱內盧的真實狀態廣告。我無法找到任何可能阻止Beautifulsoup工作的html源代碼。它的大小?
我正在使用Enthought Canopy Python 2.7.6,IPython Notebook 2.0,Beautifulsoup 4.3.2。
相同的代碼對我來說完美地工作,它顯示560 ... – fasouto
使用下面的提示,我的環境只適用於'html.parser'配置。 – srodriguex