Remove obsolete files #52

Merged
bilal.catic merged 2 commits from remove-obsolete-files into master 2019-10-18 10:19:11 +02:00
2 changed files with 19 additions and 1 deletions
Showing only changes of commit 67a7223a3a - Show all commits

View File

@@ -12,7 +12,8 @@
"docker-start": "docker start pg_marketalerts",
"docker-stop": "docker stop pg_marketalerts",
"crawl": "cd app/crawler && node npmCrawl.js",
"test-search": "cd test && node searchTest.js"
"test-search": "cd test && node searchTest.js",
"test-olx-scraper": "cd test && node olxScrapeTest.js"
},
"repository": {
"type": "git",

17
test/olxScrapeTest.js Normal file
View File

@@ -0,0 +1,17 @@
"use strict";
const olxCrawler = require("../app/crawler/specific/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");
}