"use strict";

const rentalCrawler = require("../app/crawler/specificCrawlers/rental");

const urlToScrape = process.argv[2] || undefined;

if (urlToScrape) {
  const crawler = new rentalCrawler();

  (async () => {
    const data = await crawler.scrapeAd(urlToScrape);
    console.log(data);
  })();
} else {
  console.log("No URL to scrape. Use like this : ");
  console.log("npm run test-rental-scraper -- URL_TO_SCRAPE");
}
