diff --git a/dags/jh/price/price_third_gxd.py b/dags/jh/price/price_third_gxd.py index a807e6a..b473364 100644 --- a/dags/jh/price/price_third_gxd.py +++ b/dags/jh/price/price_third_gxd.py @@ -36,6 +36,8 @@ for city in city_name_id_map: anjuke_price.rename(columns={'price': '安居客价格'}, inplace=True) base_price_gj = get_district_stat_on(city) seaweed_df = get_seaweed(city) + if seaweed_df.empty: + continue seaweed_df['_id'] = seaweed_df['_id'].astype('str') if base_price_gj.empty: continue @@ -56,17 +58,17 @@ for city in city_name_id_map: price_merge = price_merge.merge(data_df_temp[['_id','国信达价格']], on='_id', how='left') price_merge.rename(columns={'city': '城市', 'district': '区域', '_id': '小区ID', 'name': '小区名','yearmonth':'月份'}, inplace=True) df_concat = pd.concat([df_concat,price_merge]) -df_concat.to_excel(yearmonth + '小区第三方均价输出.xlsx', encoding='utf-8', index=False) +# df_concat.to_excel(yearmonth + '小区第三方均价输出.xlsx', encoding='utf-8', index=False) output_path = pathAll + "/" + yearmonth + '小区第三方均价输出.xlsx' df_concat.to_excel(output_path, index=False) -cloudPath = '共享/统计/' + yearmonth + '小区第三方均价输出.xlsx' +cloudPath = '共享/建行/' + yearmonth + '小区第三方均价输出.xlsx' nextcloudutils.up_to_nextcloud(output_path, cloudPath) logging.info(f"区域涨跌幅数据Excel文件已经上传到云盘") infos = "【第三方价格自动检测】" -dingutils.send_text(infos + "数据Excel文件已经上传到云盘, 请点击 https://nextcloud.fangjia.com/s/3aw663fy9BbiBeL 查看详情", "1b6d0d782d3c316f2d3b6b18ea5144816170dd392befbf2042a24a01fb84b736") +dingutils.send_text(infos + "数据Excel文件已经上传到云盘,请点击 https://nextcloud.fangjia.com/s/KwxGsosMcnYxdoa 查看详情", "1b6d0d782d3c316f2d3b6b18ea5144816170dd392befbf2042a24a01fb84b736")