- cli update
parent
bf81ef413f
commit
d2879734e6
|
@ -7,15 +7,6 @@ def main():
|
||||||
parser = argparse.ArgumentParser(description="Home Harvest Property Scraper")
|
parser = argparse.ArgumentParser(description="Home Harvest Property Scraper")
|
||||||
parser.add_argument("location", type=str, help="Location to scrape (e.g., San Francisco, CA)")
|
parser.add_argument("location", type=str, help="Location to scrape (e.g., San Francisco, CA)")
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"-s",
|
|
||||||
"--site_name",
|
|
||||||
type=str,
|
|
||||||
nargs="*",
|
|
||||||
default=None,
|
|
||||||
help="Site name(s) to scrape from (e.g., realtor, zillow)",
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-l",
|
"-l",
|
||||||
"--listing_type",
|
"--listing_type",
|
||||||
|
@ -42,18 +33,20 @@ def main():
|
||||||
help="Name of the output file (without extension)",
|
help="Name of the output file (without extension)",
|
||||||
)
|
)
|
||||||
|
|
||||||
parser.add_argument(
|
|
||||||
"-k",
|
|
||||||
"--keep_duplicates",
|
|
||||||
action="store_true",
|
|
||||||
help="Keep duplicate properties based on address"
|
|
||||||
)
|
|
||||||
|
|
||||||
parser.add_argument("-p", "--proxy", type=str, default=None, help="Proxy to use for scraping")
|
parser.add_argument("-p", "--proxy", type=str, default=None, help="Proxy to use for scraping")
|
||||||
|
parser.add_argument("-d", "--days", type=int, default=None, help="Sold in last _ days filter.")
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"-r",
|
||||||
|
"--radius",
|
||||||
|
type=float,
|
||||||
|
default=None,
|
||||||
|
help="Get comparable properties within _ (eg. 0.0) miles. Only applicable for individual addresses."
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
result = scrape_property(args.location, args.site_name, args.listing_type, proxy=args.proxy, keep_duplicates=args.keep_duplicates)
|
result = scrape_property(args.location, args.listing_type, proxy=args.proxy)
|
||||||
|
|
||||||
if not args.filename:
|
if not args.filename:
|
||||||
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||||
|
|
Loading…
Reference in New Issue