- housekeeping

pull/1/head
Zachary Hampton 2023-09-15 15:21:29 -07:00
parent ed7e76e4b0
commit a79c4c6872
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ def scrape_property(
listing_type: str = "for_sale", #: for_sale, for_rent, sold listing_type: str = "for_sale", #: for_sale, for_rent, sold
site_name: str = "redfin", site_name: str = "redfin",
) -> list[Home]: #: eventually, return pandas dataframe ) -> list[Home]: #: eventually, return pandas dataframe
if site_name not in _scrapers: if site_name.lower() not in _scrapers:
raise InvalidSite(f"Provided site, '{site_name}', does not exist.") raise InvalidSite(f"Provided site, '{site_name}', does not exist.")
if listing_type.upper() not in ListingType.__members__: if listing_type.upper() not in ListingType.__members__:
@ -25,6 +25,6 @@ def scrape_property(
listing_type=ListingType[listing_type.upper()], listing_type=ListingType[listing_type.upper()],
) )
site = _scrapers[site_name](scraper_input) site = _scrapers[site_name.lower()](scraper_input)
return site.search() return site.search()