1

Adding mysql deps, cleaning up json generation on scraper

This commit is contained in:
Alex Yatskov 2014-09-16 15:14:22 +09:00
parent e2b77d366b
commit 2b3dd0b13a
4 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
var DATA_RECORDS = [
[
{
"name": "Levain Bakery",
"relativeUrl": "/Restaurant_Review-g60763-d783460-Reviews-Levain_Bakery-New_York_City_New_York.html",
@ -67829,4 +67829,4 @@ var DATA_RECORDS = [
"atmosphere": 0.18681318681318682
}
}
]
]

View File

@ -9,7 +9,8 @@
"author": "",
"license": "BSD-2-Clause",
"dependencies": {
"underscore": "~1.6.0",
"cheerio": "~0.17.0"
"cheerio": "~0.17.0",
"mysql": "^2.5.0",
"underscore": "~1.6.0"
}
}

View File

@ -133,7 +133,7 @@ function main() {
});
process.on('exit', function() {
var strData = 'var DATA_RECORDS = ' + JSON.stringify(results, null, 4);
var strData = JSON.stringify(results, null, 4);
fs.writeFileSync(databasePath, strData);
});
}

View File

@ -11,6 +11,7 @@
"license": "BSD-2-Clause",
"dependencies": {
"express": "~4.5.1",
"mysql": "^2.5.0",
"underscore": "^1.6.0"
}
}