adding lat/lon to the db

This commit is contained in:
Kadir Tugan 2023-11-18 13:09:03 +02:00
parent 72ff6a7202
commit 8698b41e0e
2 changed files with 4 additions and 0 deletions

View file

@ -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):

View file

@ -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()