This Python script scrapes apartment listings from a Zillow clone site and optionally submits the address, price, and link of each listing into a Google Form or Google Sheet.
- Scrapes addresses, prices, and links from listings
- Submits each listing to a Google Form or Google Sheet
- Python 3.11 or higher
- Linux, Windows, macOS
-
Clone the repository
-
Open terminal and navigate to the cloned directory
-
Install python dependencies
pip install . patchright install -
Create a folder called
envin the project directory with one or more files each containing the following contents:CONFIG_NAME=<NAME SHOWN WHEN REFERRING TO THIS CONFIG (OPTIONAL)> SEARCH_URL=<URL OF THE ZILLOW CLONE TO SCRAPE> FORM_URL=<YOUR GOOGLE FORMS URL (OPTIONAL)> SHEET_URL=<YOUR GOOGLE SHEETS DOC URL (OPTIONAL)> SHEET_NAME=<NAME OF SHEET IN GOOGLE SHEETS DOC TO ADD TO (OPTIONAL)>
-
If using batch submission to a Google Sheet, add your Google Service Worker authentication file in the project root as ".service_account.json".
-
Run the script:
python -m src/main.py
The script will open a Chrome window, scrape data from each page of the Zillow clone, and submit each entry into your form.