masschaos / lottocrawler

GNU General Public License v3.0
0 stars 0 forks source link

fix: 加拿大爬虫主要字段在取值时都要先判断非null,有可能开奖不完全的情况下,有部分元素没有 #20

Closed yangjun-sheep closed 4 years ago

yangjun-sheep commented 4 years ago

当前问题:lotto649爬虫在爬取时报异常,cannot read property textcontent of null 分析:可能是缺失部分字段(guaranteedNumbers或encore没有开奖),程序中直接取该元素,并取元素中的值,报错 解决方法:在主要元素值的获取中加入非null判断,如果是null,则抛出DrawingError