-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
39 lines (36 loc) · 1.29 KB
/
Program.cs
File metadata and controls
39 lines (36 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Luppa.Crawler;
using Luppa.Data;
using Luppa.Services.BEC;
using Luppa.Services.BECList;
namespace Luppa
{
class Program
{
// lista = get a new list of bidding inside BEC website
// buscape = execute a Buscape's API using open links inside the database
// bec/no args = execute a BEC's website scrapper and crawler
static void Main(string[] args)
{
var crawler = args.Length > 0 ? args[0] : "bec";
Console.WriteLine("Starting luppa service... WE ARE AGAINST CORRUPTION!");
switch (crawler)
{
case "lista":
System.Console.WriteLine("Starting BEC's bidding scraper...");
Task.WaitAll(new BECListService().StartService());
break;
case "buscape":
System.Console.WriteLine("Starting buscape crawler...");
Task.WaitAll(new BuscapeService().StartCrawler());
break;
default:
System.Console.WriteLine("Starting bec scraper...");
Task.WaitAll(new BECService().StartService());
break;
}
}
}
}