memset0 / luogu-todolist

Todo List for https://luogu.org
GNU General Public License v3.0
60 stars 4 forks source link

运行错误 #12

Closed gandyli closed 5 years ago

gandyli commented 5 years ago

运行了host.py后(python3),给出以下错误:

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