updates to stop it breaking with an empty table

This commit is contained in:
Martin Donnelly 2016-02-24 15:50:25 +00:00
parent d9ea9cab16
commit 789b1e4cdf

View File

@ -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());
}); });
} }