Random stuff
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1
web/dist/main.css
vendored
1
web/dist/main.css
vendored
@@ -1,3 +1,4 @@
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user