add debugging log switch for crawler process
This commit is contained in:
@@ -13,7 +13,10 @@ const {
|
||||
CRAWLER_AD_TYPE
|
||||
} = require("../../common/enums");
|
||||
|
||||
const { DEFAULT_TIMEZONE } = require("../../config/appConfig");
|
||||
const {
|
||||
DEFAULT_TIMEZONE,
|
||||
PRINT_CRAWLER_DEBUG
|
||||
} = require("../../config/appConfig");
|
||||
|
||||
const OLX_ENUMS = {
|
||||
OLX_AD_TYPE: {
|
||||
@@ -156,6 +159,10 @@ class OlxCrawler {
|
||||
}
|
||||
|
||||
async indexSinglePage(url, maxResultsPerPage) {
|
||||
if (PRINT_CRAWLER_DEBUG) {
|
||||
console.log("[OLX] Index page : ", url);
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
const body = await res.text();
|
||||
|
||||
Reference in New Issue
Block a user