mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
[enh]: make last_x_days generic
add mls_only make radius generic
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .core.scrapers.models import Property
|
||||
from .core.scrapers.models import Property, ListingType
|
||||
import pandas as pd
|
||||
|
||||
ordered_properties = [
|
||||
@@ -73,4 +73,11 @@ def process_result(result: Property) -> pd.DataFrame:
|
||||
properties_df = pd.DataFrame([prop_data])
|
||||
properties_df = properties_df.reindex(columns=ordered_properties)
|
||||
|
||||
return properties_df[ordered_properties]
|
||||
return properties_df[ordered_properties]
|
||||
|
||||
|
||||
def validate_input(listing_type: str) -> None:
|
||||
if listing_type.upper() not in ListingType.__members__:
|
||||
raise InvalidListingType(
|
||||
f"Provided listing type, '{listing_type}', does not exist."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user