updates to stop it breaking with an empty table
This commit is contained in:
parent
d652921534
commit
d9ea9cab16
@ -56,7 +56,7 @@ buttons {
|
|||||||
transition: margin-left 0.2s;
|
transition: margin-left 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 600px) {
|
||||||
#header {
|
#header {
|
||||||
left: 200px;
|
left: 200px;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ function createDB() {
|
|||||||
fs.openSync(dbfile, 'w');
|
fs.openSync(dbfile, 'w');
|
||||||
db = new sqlite3.Database(dbfile, createTable);
|
db = new sqlite3.Database(dbfile, createTable);
|
||||||
db.close();
|
db.close();
|
||||||
|
connectDB();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger.info('Database already created.');
|
logger.info('Database already created.');
|
||||||
@ -118,7 +119,7 @@ function genericGrab(url) {
|
|||||||
logger.debug(tdihbody.length);
|
logger.debug(tdihbody.length);
|
||||||
tdihbody = cleaner(tdihbody);
|
tdihbody = cleaner(tdihbody);
|
||||||
logger.debug(title);
|
logger.debug(title);
|
||||||
// fs.writeFileSync(htmlfile, tdihbody.html());
|
fs.writeFileSync(htmlfile, tdihbody.html());
|
||||||
obj.push(url);
|
obj.push(url);
|
||||||
obj.push($.html());
|
obj.push($.html());
|
||||||
obj.push(tdihbody.html());
|
obj.push(tdihbody.html());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user