"use strict";

const olxCrawler = require("../app/crawler/specificCrawlers/olx");

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

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

  (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-olx-scraper -- URL_TO_SCRAPE");
}
