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;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
@media (min-width: 600px) {
|
||||
#header {
|
||||
left: 200px;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ function createDB() {
|
||||
fs.openSync(dbfile, 'w');
|
||||
db = new sqlite3.Database(dbfile, createTable);
|
||||
db.close();
|
||||
connectDB();
|
||||
}
|
||||
else {
|
||||
logger.info('Database already created.');
|
||||
@ -118,7 +119,7 @@ function genericGrab(url) {
|
||||
logger.debug(tdihbody.length);
|
||||
tdihbody = cleaner(tdihbody);
|
||||
logger.debug(title);
|
||||
// fs.writeFileSync(htmlfile, tdihbody.html());
|
||||
fs.writeFileSync(htmlfile, tdihbody.html());
|
||||
obj.push(url);
|
||||
obj.push($.html());
|
||||
obj.push(tdihbody.html());
|
||||
|
Loading…
x
Reference in New Issue
Block a user