diff --git a/crawler/crawl.js b/crawler/crawl.js index 4518c77..3dd8c5a 100644 --- a/crawler/crawl.js +++ b/crawler/crawl.js @@ -20,7 +20,7 @@ install(); // for source maps to work let crawlers = [ //new OlxCrawler(process.env.OLX_FROM_PAGE, process.env.OLX_TO_PAGE, process.env.OLX_MAX_RESULTS), - new ProstorCrawler(process.env.PROSTOR_FROM_PAGE, process.env.PROSTOR_TO_PAGE, process.env.PROSTOR_MAX_RESULTS) + new ProstorCrawler(parseInt(process.env.PROSTOR_FROM_PAGE), parseInt(process.env.PROSTOR_TO_PAGE), parseInt(process.env.PROSTOR_MAX_RESULTS)) ]; let savers = [ diff --git a/crawler/specific/prostor.js b/crawler/specific/prostor.js index 67460e1..6d4e21b 100644 --- a/crawler/specific/prostor.js +++ b/crawler/specific/prostor.js @@ -30,8 +30,6 @@ export default class ProstorCrawler { const body = await res.text(); const $ = cheerio.load(body); - console.log('bailing...'); - const title = $('#nav_center_sub > div.content_area_1_left > div:nth-child(1) > h1').text(); const category = $('#nav_center_sub > div.content_area_1_left > div.bottom10 > div.content_lr_in_show > div:nth-child(3) > div:nth-child(4) > div.size_rs > span').text(); @@ -105,12 +103,12 @@ export default class ProstorCrawler { //images.push(img); //} - const uploadPromises = images.map(img => { - return cloudinary.uploader.upload(img); - }); + //const uploadPromises = images.map(img => { + //return cloudinary.uploader.upload(img); + //}); - const uploadResults = await Promise.all(uploadPromises); - const cloudinaryImages = uploadResults.map(ur => ur.url); + //const uploadResults = await Promise.all(uploadPromises); + //const cloudinaryImages = uploadResults.map(ur => ur.url); const parsedPrice = parsePrice(price); @@ -138,7 +136,8 @@ export default class ProstorCrawler { lat, lng, loc: [parseFloat(lat), parseFloat(lng)], - images: cloudinaryImages + //images: cloudinaryImages + images }; console.log(data); @@ -231,4 +230,3 @@ export default class ProstorCrawler { return results; } } - diff --git a/web/dist/main.css b/web/dist/main.css index 51c4798..f38f465 100644 --- a/web/dist/main.css +++ b/web/dist/main.css @@ -1,3 +1,4 @@ +* { box-sizing: border-box; } body { margin: 0; height: 100%;