Dimlitter/jd_AutoComment

出错

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 是类似的。会在后续提交中修复。

另外后一个提交将会加入日志系统,请一并附上日志。

已于提交 21e3bd7 中修复,因为测试中没有发现这种情况,请发生错误的使用者测试后反馈状态。