From f08f588d942a8800e5bc18e0f84956309d77128d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=B9=B2?= Date: Sat, 28 Apr 2018 13:19:27 +0800 Subject: [PATCH] =?UTF-8?q?=09=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20Pr?= =?UTF-8?q?iceSystem/rent=5Fprice/district=5Fmap0413.py=20=09=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9A=20=20=20=20=20PriceSystem/rent=5Ftest.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PriceSystem/rent_price/district_map0413.py | 2 +- PriceSystem/rent_test.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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()