出错
Closed this issue · 4 comments
开始京东批量评价!
待评价订单 22----待晒单 0----待追评 30----服务评价 29----已评价 0----
1.开始普通评价
当前共有22个评价。
Traceback (most recent call last):
File "F:\jd\自动评论\auto_comment_plus.py", line 327, in
main()
File "F:\jd\自动评论\auto_comment_plus.py", line 304, in main
N = ordinary(N)
File "F:\jd\自动评论\auto_comment_plus.py", line 124, in ordinary
oid = Order.xpath('tr[@Class="tr-th"]/td/span[3]/a/text()')[0]
IndexError: list index out of range
爬到网站空值,一般解决方法是加个try...except块。小问题,接下来会修修看
谢谢,加了try之后,不报错了,但是continue了之后就不普通评价了。。直接跳到后面的追评了。唉
开始京东批量评价!
待评价订单 22----待晒单 0----待追评 30----服务评价 29----已评价 0---- 1.开始普通评价 当前共有22个评价。 Traceback (most recent call last): File "F:\jd\自动评论\auto_comment_plus.py", line 327, in main() File "F:\jd\自动评论\auto_comment_plus.py", line 304, in main N = ordinary(N) File "F:\jd\自动评论\auto_comment_plus.py", line 124, in ordinary oid = Order.xpath('tr[@Class="tr-th"]/td/span[3]/a/text()')[0] IndexError: list index out of range
和 #16 是类似的。会在后续提交中修复。
另外后一个提交将会加入日志系统,请一并附上日志。