mirror of
https://github.com/Bunsly/HomeHarvest.git
synced 2026-03-04 19:44:29 -08:00
Compare commits
2 Commits
e378feeefe
...
redfin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be20258535 | ||
|
|
d05bc5d79f |
11
example.py
Normal file
11
example.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from homeharvest import scrape_property
|
||||
import pandas as pd
|
||||
|
||||
properties: pd.DataFrame = scrape_property(
|
||||
site_name=["redfin"],
|
||||
location="85281",
|
||||
listing_type="for_rent" # for_sale / sold
|
||||
)
|
||||
|
||||
print(properties)
|
||||
properties.to_csv('properties.csv', index=False)
|
||||
@@ -17,6 +17,7 @@ class Scraper:
|
||||
self.listing_type = scraper_input.listing_type
|
||||
|
||||
self.session = requests.Session()
|
||||
self.session.headers.update({"user-agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36'})
|
||||
if scraper_input.proxy:
|
||||
proxy_url = scraper_input.proxy
|
||||
proxies = {"http": proxy_url, "https": proxy_url}
|
||||
|
||||
Reference in New Issue
Block a user