2024-03-10 18:49:39 +00:00
|
|
|
from rec.query import listing_query
|
|
|
|
|
import pathlib
|
|
|
|
|
import json
|
2024-03-11 14:43:53 +00:00
|
|
|
from data_access import Listing
|
2024-03-10 18:49:39 +00:00
|
|
|
|
2024-03-18 00:56:39 +00:00
|
|
|
d = listing_query(1, 3, 3, 15, 0, 800000, max_days_since_added=7)
|
2024-03-10 18:49:39 +00:00
|
|
|
folder = pathlib.Path("data/rs/")
|
|
|
|
|
|
|
|
|
|
for i in range(1, 10000):
|
|
|
|
|
try:
|
|
|
|
|
print(f"page {i}")
|
2024-03-18 00:56:39 +00:00
|
|
|
d = listing_query(i, 3, 3, 15, 0, 800000, max_days_since_added=1)
|
2024-03-10 18:49:39 +00:00
|
|
|
except:
|
|
|
|
|
break
|
2024-03-25 20:48:48 +00:00
|
|
|
|
|
|
|
|
for property in d["properties"]:
|
|
|
|
|
identifier = property["identifier"]
|
|
|
|
|
|
2024-03-11 14:43:53 +00:00
|
|
|
listing = Listing(identifier)
|
2024-03-25 20:48:48 +00:00
|
|
|
with open(listing.path_listing_json(), "w") as f:
|
2024-03-10 18:49:39 +00:00
|
|
|
json.dump(property, f)
|