Skip to content

Captures data from the realestate.com.au GraphQL endpoint, and stores it in a PostgreSQL database to easily track trends of your areas

Notifications You must be signed in to change notification settings

Jayden-Lind/Lindrea

Repository files navigation

lindrea

Simple application written in Python to automate capturing data of realestate.com.au GraphQL endpoint and stores it in a PostgreSQL database to be able to catch changes to individual property listings to track trends.

Usage

Requirements

  1. Docker Compose
  2. Docker

Building + Running

  1. Rename app.env.example to app.env and fill out the values.

Example:

DB_HOST="localhost"
DB_PORT="5432"
PGADMIN_DEFAULT_PASSWORD="password"
POSTGRES_PASSWORD="password"
POSTGRES_USER="postgres"
POSTGRES_DB="lindrea"
  1. Rename pgadmin.env.example to pgadmin.env and fill the values in if you wish to browse the data stored easily.
PGADMIN_DEFAULT_PASSWORD="password"
PGADMIN_DEFAULT_EMAIL="user@user.com"
  1. Update app.py search parameters to what values you want.
realestate_com_au_listings = api.search(
    locations=[
        "Chelsea Heights, 3196",
        "Aspendale Gardens, 3195",
        "Patterson Lakes, 3197"
    ],
    channel="buy",
    surrounding_suburbs=False,
    sortType="new-desc"
)
  1. Run the below command to build the image + bring up the necessary services.
$ docker-compose -p lindrea -f docker-compose.yml up --build -d

Query

To query, you need to enter the running container, then run the query application.

[root@JD-Dev-02 Lindrea]# docker exec -it lindrea-app-1 sh
~ # python query.py 1
"url": "https://www.realestate.com.au/property-unit-vic-patterson+lakes-xxxxx",
"history": [
    {
        "price_text": "$640,000 - $670,000",
        "date": "11PM Sat 21 Jan",
        "original_val": "$700,000 - $770,000"
    },

About

Captures data from the realestate.com.au GraphQL endpoint, and stores it in a PostgreSQL database to easily track trends of your areas

Topics

Resources

Stars

Watchers

Forks