- rename last_x_days

- docstrings for scrape_property
This commit is contained in:
Zachary Hampton
2023-10-04 18:06:06 -07:00
parent 6bb68766fc
commit de692faae2
5 changed files with 18 additions and 13 deletions

View File

@@ -61,7 +61,7 @@ options:
> homeharvest "San Francisco, CA" -l for_rent -o excel -f HomeHarvest
```
### Python
### Python
```py
from homeharvest import scrape_property
@@ -72,10 +72,10 @@ current_timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filename = f"output/{current_timestamp}.csv"
properties = scrape_property(
location="San Diego, CA",
listing_type="sold", # or (for_sale, for_rent)
last_x_days=30, # sold in last 30 days - listed in last x days if (for_sale, for_rent)
mls_only=True, # only fetch MLS listings
location="San Diego, CA",
listing_type="sold", # or (for_sale, for_rent)
property_younger_than=30, # sold in last 30 days - listed in last x days if (for_sale, for_rent)
mls_only=True, # only fetch MLS listings
)
print(f"Number of properties: {len(properties)}")
@@ -84,7 +84,6 @@ properties.to_csv(filename, index=False)
print(properties.head())
```
## Output
```plaintext
>>> properties.head()