我有一个python selenium脚本,它通过这样的循环运行。。。
for i, refcode in enumerate(refcode_list):
try:
source_checkrefcode()
except TimeoutException:
pass
csvWriter.writerow([refcode, 'error', timestamp])
如果在源代码检查期间出现问题,则脚本将崩溃并出现错误。
如何将错误处理添加到此循环,以便它只移动到下一个项目而不是崩溃?
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐