-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
70 lines (63 loc) · 2.28 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using IG_Data_Collector.Instagram;
using System;
using System.Threading.Tasks;
namespace IG_Data_Collector
{
class Program
{
static async Task Main(string[] args)
{
Bot bot = new Bot();
Helper.Print_Welcome();
bool exit = false;
while (!exit)
{
Console.Write(" How can i help you ? ");
string[] cmd = Console.ReadLine().Trim().ToLower().Split(' ');
switch (cmd[0])
{
case "help":
Helper.Print_Help();
break;
case "setup":
await bot.Setup(configfile: "./Config/Bots_List.csv");
break;
case "info":
Helper.Print_AppInfo();
break;
case "collect":
//Check if Bot is ready
if (!bot.IsBotReady)
{
Helper.Print_Msg_Err("Sorry please setup your bots frist type see 'help' for more informaiton");
break;
}
if (cmd.Length > 1)
{
switch (cmd[1])
{
case "hashtag":
bot.Collect_By_Hashtag("./Config/Hashtags_List.csv");
break;
case "profile":
bot.Collect_By_Profile("./Config/Usernames_List.csv");
break;
}
}
else
{
Helper.Print_Msg_Err("Sorry please set your collection type see help for more informaiton");
break;
}
break;
case "exit":
exit = true;
break;
default:
Helper.Print_Msg_Err(model: 1);
break;
}
}
}
}
}