-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from ZacharyHampton/v0.3
v0.3
- Loading branch information
Showing
17 changed files
with
794 additions
and
1,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from homeharvest import scrape_property | ||
from datetime import datetime | ||
|
||
# Generate filename based on current timestamp | ||
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", # for_sale, for_rent | ||
property_younger_than=30, # sold/listed in last 30 days | ||
mls_only=True, # only fetch MLS listings | ||
) | ||
print(f"Number of properties: {len(properties)}") | ||
|
||
# Export to csv | ||
properties.to_csv(filename, index=False) | ||
print(properties.head()) |
Oops, something went wrong.