python爬虫IndexError: list index out of range错误

在写python爬虫时数组部分遇到了IndexError: list index out of range错误

只要加上try…..except 错误机制跳过空值就行了

图片[1]-python爬虫IndexError: list index out of range错误-吾爱博客
try:
    出问题的代码
except IndexError:
    pass
温馨提示: 本文最后更新于2021-12-27,至今已有843天,某些文章具有时效性,若有错误或已失效,请在下方留言
© 版权声明
THE END
喜欢就支持一下吧❀
点赞1投币 分享
评论 抢沙发

    请登录后查看评论内容