From 8698b41e0e044575a3bb905566f9c20c72252a7b Mon Sep 17 00:00:00 2001 From: Kadir Tugan Date: Sat, 18 Nov 2023 13:09:03 +0200 Subject: [PATCH] adding lat/lon to the db --- rec/db.py | 2 ++ rec/query.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/rec/db.py b/rec/db.py index 7d3ac41..22058eb 100644 --- a/rec/db.py +++ b/rec/db.py @@ -17,6 +17,8 @@ class RightmoveListing(Base): listing_json = Column(JSON, nullable=True) detail_json = Column(JSON, nullable=True) updated_timestamp = Column(Integer, nullable=True) + lat = Column(FLOAT) + lon = Column(FLOAT) distance_to_office_minutes = Column(FLOAT, nullable=True) def save(self): diff --git a/rec/query.py b/rec/query.py index 4b2c8db..6b89e40 100644 --- a/rec/query.py +++ b/rec/query.py @@ -74,5 +74,7 @@ if __name__ == "__main__": listing_json=d, price=d["price"], updated_timestamp=d["updateDate"], + lat=d["latitude"], + lon=d["longitude"], ) rl.save()