Files
PriceSystem/PriceSystem/rent_test.py
T
罗干 0cc0e23a03 修改: PriceSystem/rent_price/district_map0413.py
修改:     PriceSystem/rent_test.py
	修改:     PriceSystem/test.py
2018-05-03 15:21:01 +08:00

84 lines
1.2 KiB
Python

import datetime
import fangjia
import pytz
#fangjia.send_dingding_msg("测试")
import time
import rent_price.district_map0413 as rentPrice
def get_weekend(tt):
from dateutil.parser import parse
bb=parse(tt)
pacific = pytz.timezone('Asia/Shanghai')
return pacific.localize(bb)
weekend = get_weekend('20180515')
ct='上海'
rl='青浦'
lk='馨浦苑'#上海闵行闵浦新苑一村普陀曹杨一村上海北京东城左安漪园
#黄浦伯爵居静安泰安里长宁新泾北苑上海奉贤海岸景苑闵行陇兴别墅
timm=20180430
timd=20160603
a=time.time()
rentPrice.save_to_mongo(ct,rl,lk,timd,timm)
print(time.time()-a)
'''
s = time.time()
ct='上海'
rl='浦东'
lk='滨江一品苑'
#for i in range(0, 100):深圳福田世纪豪庭
rentPrice.out_put_price(ct, rl, lk, weekend)
e = time.time()
print(e - s)
'''
'''
###
import pandas as pd
a=pd.read_excel('小区调查.xlsx')
for i in a.index:
ct=a['城市'][i]
rl=a['区域'][i]
lk=a['小区名'][i]
sellPrice.out_put_price(ct, rl, lk, weekend)
'''
'''
@fangjia.cache(1000)
def sum1(a, b):
print(111)
return a + b
print(sum1(1,2))
'''