Removing sqlalchemy and the db part as it was never used

This commit is contained in:
Kadir 2025-05-12 01:17:45 +01:00
parent 3f4be8b7ff
commit bb2488a63b
6 changed files with 1 additions and 257 deletions

View file

@ -2,7 +2,6 @@
import enum
from typing import List
import requests
from rec.db import RightmoveListing
import urllib3
urllib3.disable_warnings()
@ -94,23 +93,3 @@ def listing_query(
return response.json()
if __name__ == "__main__":
response = listing_query(
page=1,
min_bedrooms=2,
max_bedrooms=2,
radius=5.0,
min_price=150000,
max_price=700000,
)
resp = response
for d in resp["properties"]:
rl = RightmoveListing(
id=d["identifier"],
listing_json=d,
price=d["price"],
updated_timestamp=d["updateDate"],
lat=d["latitude"],
lon=d["longitude"],
)
rl.save()