parent
b23b55ca80
commit
803fd618e9
|
@ -53,7 +53,9 @@ def scrape_property(
|
||||||
if not properties_dfs:
|
if not properties_dfs:
|
||||||
return pd.DataFrame()
|
return pd.DataFrame()
|
||||||
|
|
||||||
|
properties_dfs = [df for df in properties_dfs if not df.empty]
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
warnings.simplefilter("ignore", category=FutureWarning)
|
warnings.simplefilter("ignore", category=FutureWarning)
|
||||||
|
|
||||||
return pd.concat(properties_dfs, ignore_index=True, axis=0)[ordered_properties].replace({"None": "", None: ""})
|
return pd.concat(properties_dfs, ignore_index=True, axis=0)[ordered_properties].replace({"None": pd.NA, None: pd.NA, "": pd.NA})
|
||||||
|
|
|
@ -36,6 +36,7 @@ class PropertyType(Enum):
|
||||||
CONDO_TOWNHOME = "CONDO_TOWNHOME"
|
CONDO_TOWNHOME = "CONDO_TOWNHOME"
|
||||||
CONDO_TOWNHOME_ROWHOME_COOP = "CONDO_TOWNHOME_ROWHOME_COOP"
|
CONDO_TOWNHOME_ROWHOME_COOP = "CONDO_TOWNHOME_ROWHOME_COOP"
|
||||||
CONDO = "CONDO"
|
CONDO = "CONDO"
|
||||||
|
CONDOP = "CONDOP"
|
||||||
CONDOS = "CONDOS"
|
CONDOS = "CONDOS"
|
||||||
COOP = "COOP"
|
COOP = "COOP"
|
||||||
DUPLEX_TRIPLEX = "DUPLEX_TRIPLEX"
|
DUPLEX_TRIPLEX = "DUPLEX_TRIPLEX"
|
||||||
|
|
|
@ -806,7 +806,7 @@ class RealtorScraper(Scraper):
|
||||||
return Description(
|
return Description(
|
||||||
primary_photo=primary_photo,
|
primary_photo=primary_photo,
|
||||||
alt_photos=RealtorScraper.process_alt_photos(result.get("photos")),
|
alt_photos=RealtorScraper.process_alt_photos(result.get("photos")),
|
||||||
style=PropertyType(style) if style else None,
|
style=PropertyType.__getitem__(style) if style and style in PropertyType.__members__ else None,
|
||||||
beds=description_data.get("beds"),
|
beds=description_data.get("beds"),
|
||||||
baths_full=description_data.get("baths_full"),
|
baths_full=description_data.get("baths_full"),
|
||||||
baths_half=description_data.get("baths_half"),
|
baths_half=description_data.get("baths_half"),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "homeharvest"
|
name = "homeharvest"
|
||||||
version = "0.3.23"
|
version = "0.3.24"
|
||||||
description = "Real estate scraping library"
|
description = "Real estate scraping library"
|
||||||
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
authors = ["Zachary Hampton <zachary@bunsly.com>", "Cullen Watson <cullen@bunsly.com>"]
|
||||||
homepage = "https://github.com/Bunsly/HomeHarvest"
|
homepage = "https://github.com/Bunsly/HomeHarvest"
|
||||||
|
|
Loading…
Reference in New Issue