Traceback (most recent call last):
File "D:\洛谷todolist\spider.py", line 14, in getTitle
return titleList[prob]
KeyError: '#'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "host.py", line 1, in <module>
import spider, webserver
File "D:\spider.py", line 114, in <module>
update()
File "D:\spider.py", line 98, in update
todo = getTodoList()
File "D:\spider.py", line 88, in getTodoList
prob.append(Todo(it))
File "D:\spider.py", line 54, in __init__
self.title = getTitle(prob)
File "D:\spider.py", line 20, in getTitle
title = text.split('<title> {prob} '.format(prob=prob))[1].split(' - 洛谷</title>')[0]
IndexError: list index out of range
运行了host.py后(python3),给出以下错误: