scrapy爬虫框架xpath.extract()[0]错误记录:IndexError: list index out of range

IndexError: list index out of range

刚开始做scrapy爬虫程序,遇到这个问题IndexError: list index out of range 
搜索了以下答案

这个错误出现大约有两种情况: 
第1种可能情况 
list[index]index超出范围

第2种可能情况 
list是一个空的 没有一个元素 
进行list[0]就会出现该错误

猜你喜欢

转载自blog.csdn.net/qq_38162763/article/details/81352883