updates to stop it breaking with an empty table
This commit is contained in:
parent
d9ea9cab16
commit
789b1e4cdf
@ -119,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());
|
|
||||||
obj.push(url);
|
obj.push(url);
|
||||||
obj.push($.html());
|
obj.push($.html());
|
||||||
obj.push(tdihbody.html());
|
obj.push(tdihbody.html());
|
||||||
@ -127,7 +127,8 @@ function genericGrab(url) {
|
|||||||
busEmitter.emit("saveRecipeData", obj);
|
busEmitter.emit("saveRecipeData", obj);
|
||||||
|
|
||||||
}
|
}
|
||||||
// fs.writeFileSync(bodyfile, $.html());
|
//fs.writeFileSync(htmlfile, tdihbody.html());
|
||||||
|
fs.writeFileSync(bodyfile, $.html());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user