GithubHelp home page GithubHelp logo

mowlc / real-estate-scraper Goto Github PK

View Code? Open in Web Editor NEW
35.0 7.0 6.0 3.11 MB

Web scraper that makes it easier to find real estate in Slovenia.

License: MIT License

JavaScript 100.00%
realestate javascript scraper slovenia nodejs bolha nepremicnine

real-estate-scraper's People

Contributors

mowlc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

real-estate-scraper's Issues

Cannot read property '0' of undefined

I keep getting this error:

real-estate-scraper/scraper.js:68
	price: bAds[i].children[7].children[1].children[0].children[0].data
                                                                    ^
TypeError: Cannot read property '0' of undefined

Do you have a clue, what could be the problem? Tried to remove Bolha scraping, but for Nepremicnice happens the same but after a couple of iterations.

Self signed certificate

I get the following error once I run the script.

"Error sending mail: Error: self signed certificate in certificate chain"

Any idea how to resolve this issue?
Thanks!

NEPREMICNINE no data errTypeError

I get an error, the program does not crash, but keeps throwing these errors when trying to scrape on the defined interval:

NEPREMICNINE no data errTypeError: Cannot read property 'children' of undefined

Scraping and email sending works for bolha, but not for nepremicnine, this is the config I am using (it is a valid JSON file):

{
	"sender_email" : "[email protected]",
	"clientID": "sampleClientId",
	"clientSecret": "sampleSecret",
	"refreshToken": "sampleRefreshToken",
	"accessToken": "sampleAccessToken",
	"interval" : 15,
	"receiver_email" : ["[email protected]"],
	"url_bolha" : ["http://www.bolha.com/nepremicnine/stanovanja/?location=Gorenjska%2FKranj%2F&adTypeH=02_Oddam%2F&priceSortField=0|700"],
	"url_nepremicnine" : ["https://www.nepremicnine.net/oglasi-oddaja/gorenjska/kranj/stanovanje/cena-do-700-eur-na-mesec/"]
}

I am using latest NodeJS on raspberry pi which is using Debian Raspbian. Running the scraper with command:
node scraper.js

AssertionError [ERR_ASSERTION]: protocol mismatch

Hello,
i came across with this problem:

Tue Jan 09 2018 13:55:51 GMT+0000 (UTC) STARTED
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: protocol mismatch
    at parseOptions (/home/ubuntu/real-estate-scraper/node_modules/follow-redirects/create.js:131:10)
    at H.request (/home/ubuntu/real-estate-scraper/node_modules/follow-redirects/create.js:108:19)
    at tinyreq (/home/ubuntu/real-estate-scraper/node_modules/tinyreq/lib/index.js:73:65)
    at Timeout._onTimeout (/home/ubuntu/real-estate-scraper/scraper.js:131:5)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Client ID and clientSecret were obtained from Google dev console. My first guess what can cause this error is some incompatible version of some library or node itself?
I tried to run run this on Node v8.9.4.

Any help is appreciated.

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.