"use strict";

const saljicCrawler = require("../app/crawler/specificCrawlers/saljic");

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

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

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