优化价格类型
This commit is contained in:
@@ -60,7 +60,7 @@ def calc(city, year_month):
|
||||
action = UpdateOne({'cat': 'office', 'city': curr_city, 'district': region, 'name': name, 'date': year_month},
|
||||
{'$set': {'city': curr_city, 'cat': 'office', 'date': year_month, 'district': region,
|
||||
'name': name,
|
||||
'avg_price': sell_price, 'estate_type2': estate_type2, 'bed_kind': bed_kind,
|
||||
'avg_price': int(sell_price), 'estate_type2': estate_type2, 'bed_kind': bed_kind,
|
||||
'location': location,
|
||||
'calc_type': 5, 'updated_date': datetime.now()}},
|
||||
upsert=True)
|
||||
@@ -85,8 +85,6 @@ if yearmonth == '':
|
||||
try:
|
||||
if type(yearmonth) is str:
|
||||
yearmonth = int(yearmonth)
|
||||
# for curr_city in areautils.get_all_cities():
|
||||
# print("正在处理城市:{}".format(curr_city))
|
||||
calc(None, yearmonth)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
Reference in New Issue
Block a user