-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
39 lines (32 loc) · 1.19 KB
/
Program.cs
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 SplashScraper.Controller;
namespace SplashScraper
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Stock/Sector Scraper.");
var input = Choice();
if (input == "S") {
var controller = new BeursController("splash.mathiascloet.com",8050, "/home/cloet/Projects/school/bachelorproef/SplashScraper/data");
controller.ScrapeBeurs();
}
if (input == "E") {
var controller = new SectorController("splash.mathiascloet.com",8050,"/home/cloet/Projects/school/bachelorproef/SplashScraper/data");
controller.ScrapeSectoren();
}
}
private static string Choice() {
Console.Write("Scrape stocks (S) or sectors (E): ");
var input = Console.ReadLine().ToUpper();
if (input.Trim() == "S" || input.Trim() == "E") {
return input.Trim();
}
else {
Console.WriteLine("Invalid choice choose,'S' or 'E'.");
return Choice();
}
}
}
}