|
@@ -396,13 +396,15 @@ def main():
|
|
|
log.info("正在全量采集浙江省海关数据")
|
|
|
crawl_with_selenium('http://hangzhou.customs.gov.cn/hangzhou_customs/575609/zlbd/575612/575612/6430241/6430315/index.html', 'all')
|
|
|
duration = time.time() - start_time
|
|
|
- send_dingtalk_message(f'【浙江省海关】全量数据采集完成,耗时 {duration:.2f} 秒')
|
|
|
+ minutes, seconds = divmod(duration, 60)
|
|
|
+ send_dingtalk_message(f'【浙江省海关】全量数据采集完成,耗时 {int(minutes)}分{seconds:.1f}秒')
|
|
|
else:
|
|
|
log.info("正在增量采集浙江省海关数据")
|
|
|
res = crawl_with_selenium('http://hangzhou.customs.gov.cn/hangzhou_customs/575609/zlbd/575612/575612/6430241/6430315/index.html','auto')
|
|
|
if res == 'finish':
|
|
|
duration = time.time() - start_time
|
|
|
- send_dingtalk_message(f'【浙江省海关】增量数据采集完成,耗时 {duration:.2f} 秒')
|
|
|
+ minutes, seconds = divmod(duration, 60)
|
|
|
+ send_dingtalk_message(f'【浙江省海关】增量数据采集完成,耗时 {int(minutes)}分{seconds:.1f}秒')
|
|
|
|
|
|
res = get_commodity_trade_by_prov_year_month('浙江省', get_last_month())
|
|
|
if res is not None:
|