1.1.6 • Published 2 years ago
nepremicnine-web-scraper v1.1.6
nepremicnine.net web scraper
This is a web scraper for nepremicnine.net, that was created for personal use on a school project. Support for houses, vacation homes, and other types of real-estate, may be added in the future.
NOTE: By default, this only returns apartments that have coordinates, which also gives an address via the GeoCode API. If you want ALL of the apartments, simply comment out line 100 in nepremicnine-web-scraper.js
How to use:
- Require this in your application.
const nepremicnineWebScraper = require('nepremicnine-web-scraper')
- Initialize an instance of WebScraper, that takes a Google GeoCode API key as a constructor argument.
let webScraper = new nepremicnineWebScraper.WebScraper("YOUR API KEY")
You can get your API key HERE.
- Run the scrape function, that takes query parameters as an argument. They need to be a string of this structure: "argument1/argument2/".
webScraper.scrape("juzna-primorska/stanovanje/velikost-od-50-do-100-m2/")
The arguments can be found in the URL on nepremicnine.net, when you search for specific apartments with conditions.
- That's it. After the function finishes, which might take a few minutes, an array filled with Apartment objects is returned.