2
from bs4 import BeautifulSoup


page=BeautifulSoup(page2)
self.response.out.write(page.title.string)
self.response.out.write("""<br />""")

mdays={}
mo={}
cost={}
ac={}
nc={}
month=(page.findAll('td',style="border-style: solid; border-width: 1px", align="RIGHT"))

mo[0]=(month[0].contents)
mdays[0]=month[1].contents
cost[0]=month[2].contents
nc[0] = month[4].contents
ac[0]=month[5].contents
self.response.out.write(mo[0].string)

第一个 out.write 语句打印标题,但其余打印 Null Beautful Soup 代码在 IDLE 上正常工作,但在 AppEngine 上不正常

4

0 回答 0