Adding mysql deps, cleaning up json generation on scraper
This commit is contained in:
parent
e2b77d366b
commit
2b3dd0b13a
@ -1,4 +1,4 @@
|
|||||||
var DATA_RECORDS = [
|
[
|
||||||
{
|
{
|
||||||
"name": "Levain Bakery",
|
"name": "Levain Bakery",
|
||||||
"relativeUrl": "/Restaurant_Review-g60763-d783460-Reviews-Levain_Bakery-New_York_City_New_York.html",
|
"relativeUrl": "/Restaurant_Review-g60763-d783460-Reviews-Levain_Bakery-New_York_City_New_York.html",
|
||||||
@ -67829,4 +67829,4 @@ var DATA_RECORDS = [
|
|||||||
"atmosphere": 0.18681318681318682
|
"atmosphere": 0.18681318681318682
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"underscore": "~1.6.0",
|
"cheerio": "~0.17.0",
|
||||||
"cheerio": "~0.17.0"
|
"mysql": "^2.5.0",
|
||||||
|
"underscore": "~1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ function main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
process.on('exit', function() {
|
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);
|
fs.writeFileSync(databasePath, strData);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"license": "BSD-2-Clause",
|
"license": "BSD-2-Clause",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "~4.5.1",
|
"express": "~4.5.1",
|
||||||
|
"mysql": "^2.5.0",
|
||||||
"underscore": "^1.6.0"
|
"underscore": "^1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user