diff --git a/PriceSystem/rent_price/district_map0413.py b/PriceSystem/rent_price/district_map0413.py index 5d1f9fc..e2c6e48 100644 --- a/PriceSystem/rent_price/district_map0413.py +++ b/PriceSystem/rent_price/district_map0413.py @@ -1021,7 +1021,7 @@ def save_to_mongo(ct,rl,lk,timd,timm): "avg_price":mm, "c_date":date,"weekend":timme,"cat":'district'}) save_lg=client136.fangjia_stat.rent_1221 """ - if type(mm)!=str: + if type(mm)!=str and mm!=None: mm=float(mm) #get_sqm_rentprice_db() diff --git a/PriceSystem/rent_test.py b/PriceSystem/rent_test.py index 70d820f..6a9dbb6 100644 --- a/PriceSystem/rent_test.py +++ b/PriceSystem/rent_test.py @@ -17,9 +17,9 @@ def get_weekend(tt): weekend = get_weekend('20180415') ct='上海' -rl='宝山' -lk='水上新村'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园 -#黄浦伯爵居静安泰安里长宁新泾北苑 +rl='奉贤' +lk='海岸景苑'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园 +#黄浦伯爵居静安泰安里长宁新泾北苑上海奉贤海岸景苑 timm=20180430 timd=20160603 a=time.time()