BeautifulSoup 和我没有认识到br.response().read()
. 我已经导入 BeautifulSoup
#snippet:
# Select the first (index zero) form
br.select_form(nr=0)
br.form.set_all_readonly(False)
br['__EVENTTARGET'] = list_of_dates[0]
br['__EVENTARGUMENT'] = 'calMain'
br['__VIEWSTATE'] = viewstate
br['__EVENTVALIDATION'] = eventvalidation
response = br.submit()
print br.response().read() #*#this prints the html I'm expecting*
soup = BeautifulSoup(br.response().read()) #*#but this throws
#TypeError: 'module' object is not callable.
#Yet if I call soup = BeautifulSoup("http://page.com"), it's cool.*
selecttable = soup.find('table',{'id':"tblItems"})
#/snippet
... 等等
所以我觉得我有错误的“对象”,但是,BeautifulSoup 想要什么样的“对象”?