Giter Club home page Giter Club logo

domain-scraper's Introduction

Simple Domain.com.au scraper

A very simple domain.com.au rental listing scraper to compare listings as there is no compare option in domain. So this script pulls in X number of listing that helps you compare domain's rental listing as coming to a new city it is a very handy thing to have. This will be very helpful to people trying to move and even more helpful to people who just landed in Australian cities.

From domain shortlist listing to to a csv file

Disclaimer

Very irresponsible and hacky software ahead that works and does the job :). It might break randomly.

Packages

It is only using Axios, Cheerio and Json2Csv for now.

Steps

Each domain rental listing has a unique Id like https://www.domain.com.au/12500140 redirects to

https://www.domain.com.au/27a-arcadia-road-chester-hill-nsw-2162-12500140 but the id 12500140 stays the same. So this script uses this unique id to visit that page and scrape 10 fields out of it then save it as a csv which is a lot easy to compare than visiting 10-20 pages. For an example I took 5 listing/IDs randomly. You can do it following the steps below:

  • Add all your liked listing on domain.com.au in your shortlist. Yes you need to register and login.
  • Then run this super small script on each of your shortlist page to get the IDs you want to compare. (only tested on chrome)

script run on chrome

  • Copy/replace the IDs to line no. 22-27, basically fill up the listingIds array correctly.
  • Then run the script as shown below to get the csv of your listing Ids.

Run

node index.js gives out domain-rentals.csv in the same directory with some fields for comparision like rent, no. of bedrooms, no. of bathrooms, no. of parking, available from etc. Hopefully you have a recent verison of node installed locally or try docker.

Running with docker

Just do docker-compose up. On each save it will run the scirpt as it is running with nodemon.

Tests

Would have been good to have them, it is just a useful hack.

Gotcha

It will not run for buying listings and it will have wierd characters here and there. Don't like this, send a PR! ;)

Contributions

Yes of course, there are lots of things to improve. Any contribution/PR is really welcome.

To Do

  • add docker and docker-compose
  • add tests may be :D

domain-scraper's People

Contributors

dependabot[bot] avatar geshan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.