puppylpg / oddish

Crawl csgo skin info from `buff.163.com` and steam, then find the most suitable one to buy from the former and to sell to the latter.
https://puppylpg.github.io/2019/12/07/python-crawler-buff-optimaze/
GNU General Public License v3.0
323 stars 81 forks source link

Add some checks. #39

Closed puppylpg closed 4 years ago

puppylpg commented 4 years ago

要增加/修改的功能/修复的bug

因为超时或者其他原因数据不存在是,会导致一堆报错(虽然并不影响程序继续执行)。增加各种校验,避免到处报错。

相关issue

35

改动内容描述

- 增加了一些校验,防止特殊情况数据不存在时报错:
    + 写cache前校验爬取内容是否超时为None;
    + 数据表为空校验。没爬到数据就不给出建议了;
    + 获取steam历史价格返回时,增加'prices' key存在性校验;

核验信息

核验以下信息,已完成的项记得补全check box(中括号里填'x'):

新代码效果截屏(建议)