From a426314f3ec6614be0fbc39f9472245cf83993bd Mon Sep 17 00:00:00 2001 From: Bram van der Veen <96aa48@gmail.com> Date: Sun, 14 Jun 2015 23:04:33 +0200 Subject: [PATCH] Changed schoolid to school_id for readability --- spider.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spider.js b/spider.js index f11c271..1aa7e1b 100644 --- a/spider.js +++ b/spider.js @@ -9,7 +9,7 @@ var scheduletypes = [ 'Leerlingrooster', 'Lokaalrooster' ]; -var schoolid; +var school_id; var database; //Function for getting pages with http requests. @@ -20,7 +20,7 @@ function get() { (function (scheduletype) { - var link = 'http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + schoolid + '&type=' + scheduletype; + var link = 'http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + scheduletype; http.get(link, function (res) { @@ -58,7 +58,7 @@ function rip(data) { (function (studentcategory) { - http.get('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + schoolid + '&type=' + data.type + '&afdeling=' + studentcategory, function (res) { + http.get('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + data.type + '&afdeling=' + studentcategory, function (res) { var _download = ''; res.on('data', function (data) { @@ -111,7 +111,7 @@ function rip(data) { //Function being called to access functionality from this module. function crawl(sid) { - schoolid = sid; + school_id = sid; mongodb.connect('mongodb://wallpiece/roosterio', function (error, db) { if (error) console.warn(error); database = db;