add command to dump existing listing from fs to db
This commit is contained in:
parent
f7fb891648
commit
8b2025e700
6 changed files with 121 additions and 13 deletions
|
|
@ -4,6 +4,7 @@ from dataclasses import dataclass
|
|||
import json
|
||||
import pathlib
|
||||
from typing import Any, List, Dict
|
||||
from models.listing import ListingSite
|
||||
from rec import floorplan, routing
|
||||
import re
|
||||
import datetime
|
||||
|
|
@ -379,6 +380,18 @@ class Listing:
|
|||
with open(self.path_price_history(), "r") as f:
|
||||
return json.load(f)
|
||||
|
||||
@property
|
||||
def longtitude(self) -> float:
|
||||
return self.detailobject["property"]["longitude"]
|
||||
|
||||
@property
|
||||
def latitude(self) -> float:
|
||||
return self.detailobject["property"]["latitude"]
|
||||
|
||||
@property
|
||||
def listing_site(self) -> ListingSite:
|
||||
return ListingSite.RIGHTMOVE # this class supports only right move
|
||||
|
||||
async def dict_nicely(self):
|
||||
travel_time_fastest = {}
|
||||
travel_time_second = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue