removing logging
This commit is contained in:
parent
6fd0ce8eec
commit
8e46b1cdf3
@ -112,10 +112,6 @@ function genericGrab(url,res) {
|
|||||||
if (err)
|
if (err)
|
||||||
throw err;
|
throw err;
|
||||||
|
|
||||||
console.log("headers: ", resp.headers);
|
|
||||||
console.log(resp.statusCode);
|
|
||||||
logger.info('A');
|
|
||||||
logger.info(body);
|
|
||||||
if (resp.headers.hasOwnProperty('content-encoding')) {
|
if (resp.headers.hasOwnProperty('content-encoding')) {
|
||||||
logger.warn('content-encoding');
|
logger.warn('content-encoding');
|
||||||
if (resp.headers['content-encoding'] == 'gzip') {
|
if (resp.headers['content-encoding'] == 'gzip') {
|
||||||
@ -139,9 +135,7 @@ function genericGrab(url,res) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.info('Processing other body...');
|
|
||||||
var b = processBody(body,url);
|
var b = processBody(body,url);
|
||||||
console.log(b);
|
|
||||||
if (res != null)
|
if (res != null)
|
||||||
{
|
{
|
||||||
res.render('grabbed');
|
res.render('grabbed');
|
||||||
@ -150,19 +144,13 @@ function genericGrab(url,res) {
|
|||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
logger.info('Processing body...');
|
|
||||||
var b = processBody(body,url);
|
var b = processBody(body,url);
|
||||||
if (res != null)
|
if (res != null)
|
||||||
{
|
{
|
||||||
console.log({data:b});
|
|
||||||
res.render('grabbed',{data:b});
|
res.render('grabbed',{data:b});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info('END');
|
|
||||||
|
|
||||||
//fs.writeFileSync(htmlfile, tdihbody.html());
|
|
||||||
// fs.writeFileSync(bodyfile, $.html());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +162,6 @@ router.get('/list', function (req, res) {
|
|||||||
|
|
||||||
var outJSON = [];
|
var outJSON = [];
|
||||||
body.rows.forEach(function(doc) {
|
body.rows.forEach(function(doc) {
|
||||||
logger.info(doc);
|
|
||||||
outJSON.push({id:doc.id, title:doc.value })
|
outJSON.push({id:doc.id, title:doc.value })
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -199,7 +186,6 @@ router.get('/entry/:id', function (req, res) {
|
|||||||
if (!err) {
|
if (!err) {
|
||||||
|
|
||||||
var outJSON = {};
|
var outJSON = {};
|
||||||
logger.debug(body);
|
|
||||||
outJSON.title = body.title;
|
outJSON.title = body.title;
|
||||||
outJSON.reduced = body.reduced;
|
outJSON.reduced = body.reduced;
|
||||||
//logger.debug(util.inspect(body));
|
//logger.debug(util.inspect(body));
|
||||||
|
Loading…
Reference in New Issue
Block a user