-
Notifications
You must be signed in to change notification settings - Fork 9
/
tests.py
29 lines (21 loc) · 901 Bytes
/
tests.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
from redfin_scraper import RedfinScraper
scraper=RedfinScraper()
scraper=RedfinScraper()
scraper.setup('./zip_code_database.csv',multiprocessing=True)
scraper=RedfinScraper()
scraper.setup() # From Config
scraper.setup() # Test for no re-download
scraper.scrape(city_states=None,zip_codes=['JUNK'])
scraper.scrape(city_states=None,zip_codes='JUNK')
scraper.scrape(city_states=['Omaha, NE'],zip_codes='JUNK')
scraper.scrape(city_states=None,zip_codes=['77002','JUNK','77003'])
scraper.scrape(city_states=['Omaha,NE'],zip_codes=None)
scraper.scrape(city_states=[('Newark', 'NJ'),'JUNK, JUNKY'],zip_codes=None)
scraper.scrape(city_states=['junk, junky'],zip_codes=['77002'])
scraper.scrape() # From Config
scraper.scrape(city_states=['Omaha,NE'],zip_codes=None,sold=True,sale_period='3mo')
for i in range(1,11):
try:
scraper.get_data(id=f"D00{i}")
except:
print("Failed")