KeyError: 'url'
F:\software\Python27\python.exe F:/software/Python27/PycharmProjects/spider_main.py
craw 1 : http://baike.baidu.com/view/21087.htm
craw 2 : http://baike.baidu.com/view/10812319.htm
Traceback (most recent call last):
File "F:/software/Python27/PycharmProjects/spider_main.py", line 44, in <module>
obj_spider.craw(root_url)
File "F:/software/Python27/PycharmProjects/spider_main.py", line 39, in craw
self.outputer.output_html()
File "F:\software\Python27\PycharmProjects\html_outputer.py", line 28, in output_html
fout.write('<td>%s</td>'%data['url'])
KeyError: 'url'
奇怪,不知道什么原因,就打印了2行,麻烦大神帮忙看看?