Kaynağa Gözat

Bump up max price to 1m (YAY GOOGLE)

Martin 7 yıl önce
ebeveyn
işleme
baa6545650
2 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 4 2
      config.py
  2. 1 1
      properties.py

+ 4 - 2
config.py

@@ -31,6 +31,8 @@ WORKPLACE_TARGET_TIME = 1540893600 # tue 10:00
 while WORKPLACE_TARGET_TIME < time.time():
     WORKPLACE_TARGET_TIME += 7*24*3600
 
+MAX_PRICE = 1000000
+
 SEARCH_PARAMS = {
     'ChannelIds': [1],
     'Destinations': [],
@@ -42,12 +44,12 @@ SEARCH_PARAMS = {
     'LocalityIds': [],
     'MaxBeds': "",
     'MaxEnergyRating': "",
-    'MaxPrice': "600000",
+    'MaxPrice': "1000000",
     'MaxSize': "",
     'MinBathrooms': "1",
     'MinBeds': "2",
     'MinEnergyRating': "",
-    'MinPrice': "100000",
+    'MinPrice': "200000",
     'MinSize': "",
     'NegotiatorIds': [],
     'PreSixtyThree': False,

+ 1 - 1
properties.py

@@ -4,7 +4,7 @@ import config
 
 def load_properties(require_active=True):
     with db.connect() as conn:
-        rows = conn.select('select id, lat, lon, size, price, bedrooms, ber from properties where price<550000 and property_type != "Site"')
+        rows = conn.select('select id, lat, lon, size, price, bedrooms, ber from properties where price<%i and property_type != "Site"' % config.MAX_PRICE)
 
         res = {}
         for property_id, lat, lon, size, price, bedrooms, ber in rows: