【发布时间】:2013-06-13 07:11:09
【问题描述】:
这是我目前的代码
# -*- encoding: utf-8 -*-
import urllib2
from BeautifulSoup import BeautifulSoup as bs
import json
data = urllib2.urlopen('http://www.jma.go.jp/en/yoho/320.html')
html_doc = data.read()
soup = bs(html_doc)
weather = soup.find('table',attrs={'class':'forecast'})
weather_res = weather.find_all('th')
为什么我会收到 NoneType 错误...
【问题讨论】:
标签: python beautifulsoup