2023-09-15 20:58:54 -07:00
|
|
|
from homeharvest import scrape_property
|
|
|
|
|
|
|
|
|
|
|
|
def test_realtor():
|
2023-09-16 13:39:03 -07:00
|
|
|
results = [
|
2023-09-18 13:43:44 -07:00
|
|
|
scrape_property(
|
|
|
|
location="2530 Al Lipscomb Way",
|
|
|
|
site_name="realtor.com",
|
|
|
|
listing_type="for_sale",
|
|
|
|
),
|
|
|
|
scrape_property(
|
|
|
|
location="Phoenix, AZ", site_name="realtor.com", listing_type="for_rent"
|
|
|
|
), #: does not support "city, state, USA" format
|
|
|
|
scrape_property(
|
|
|
|
location="Dallas, TX", site_name="realtor.com", listing_type="sold"
|
|
|
|
), #: does not support "city, state, USA" format
|
2023-09-17 13:06:31 -07:00
|
|
|
scrape_property(location="85281", site_name="realtor.com"),
|
2023-09-16 13:39:03 -07:00
|
|
|
]
|
2023-09-15 20:58:54 -07:00
|
|
|
|
2023-09-16 13:39:03 -07:00
|
|
|
assert all([result is not None for result in results])
|