A lightweight bot for LikesTool using only HTTP requests and not Selenium
[C#].NET Core
- Youtube Views (no account needed)
- Dailymotion Views (no account needed)
Use builder to get instance:
ILikesToolBotAPI likesToolAPI = LikesToolBotAPI.API.Builder.LikesToolBotAPIBuilder.CreateBuilder()
.SetAccount("email", "password")
.Build();
You can subscribe to an event to get live information on coins / session, subscribe after your account is connected!
likesToolAPI.Session.PropertyChanged += Session_PropertyChanged;
private static void Session_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "Coins")
Console.WriteLine($"Coins: {likesToolAPI.Session.Coins}");
}
static ILikesToolBotAPI likesToolAPI;
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
likesToolAPI = LikesToolBotAPI.API.Builder.LikesToolBotAPIBuilder.CreateBuilder()
.SetAccount("", "")
.Build();
Run();
while(Console.ReadLine() != "quit") { }
}
static async void Run()
{
var login = await likesToolAPI.LoginAsync();
if (login.result)
{
Console.WriteLine("Connected!");
Console.WriteLine("Coins: " + login.message);
likesToolAPI.Session.PropertyChanged += Session_PropertyChanged;
await likesToolAPI.Special.ViewYoutubeVideo(1);
var logout = await likesToolAPI.LogoutAsync();
if (!logout.result)
{
Console.WriteLine(logout.message);
}
else
{
Console.WriteLine("Disconnected!");
}
}
else
Console.WriteLine(login.message);
}
private static void Session_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "Coins")
Console.WriteLine($"Coins: {likesToolAPI.Session.Coins}");
//likesToolAPI.Session.CoinsEarned
//likesToolAPI.Session.YoutubeViews
}