-
Notifications
You must be signed in to change notification settings - Fork 0
/
delco_scraper.py
39 lines (37 loc) · 1.73 KB
/
delco_scraper.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from scraper import sales_history_by_date_range, sales_history_by_year_batch, parcel_details
print("""
_ _
| | | |
__| | ___| | ___ ___ ______ ___ ___ _ __ __ _ _ __ ___ _ __
/ _` |/ _ \ |/ __/ _ \______/ __|/ __| '__/ _` | '_ \ / _ \ '__|
| (_| | __/ | (_| (_) | \__ \ (__| | | (_| | |_) | __/ |
\__,_|\___|_|\___\___/ |___/\___|_| \__,_| .__/ \___|_|
| |
|_| v1.0
""")
print('Hello, welcome to the delco scraper CLI!')
while True:
response = input('Please enter a command! (-h for help)\n')
if response == '-a':
street = input('Please enter a street name: ')
sales_history_by_date_range(street)
break
elif response == '-b':
start = input('Starting Year (YYYY): ')
end = input('Ending Year (YYYY): ')
sales_history_by_year_batch(start, end)
break
elif response == '-p':
parcel_details()
break
elif response == '-h':
print("""
Input Commands List
----------------------------------------------------------------------------------------
-b for sales data web scrape between two years
-p manual parcel updates (this should run automatically after each web scrape)
-a basic sales scrape for the past year with street input (do not input street numbers)
----------------------------------------------------------------------------------------
""")
else:
print('Please enter a valid command!')