I made some C# code to grab youtube thumbnails from urls, I originally made this in python took some time converting it to C#. I am VERY new to C# and did this with minimal help.
Please Review!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
internal class Program
{
static void Main(string[] args)
{
var HD = "maxresdefault.jpg";
var SD = "hqdefualt.jpg";
Console.WriteLine("Welcome to the C# version of YT thumbnail grabber!\nTo get started, go to any video and click 'copy url', then paste it into the program and we'll do the rest!\nTwo websites will open, one with a HD version of the thumbnail, and one with a SD version\nWARNING: A THUMBNAIL MAY ONLY LOAD IN SD OR HD. WHICHEVER IT WAS MADE IN\nInput URL now - ");
var link = Console.ReadLine();
var image = link.Split('/')[3];
var website = "https://img.youtube.com/vi/" + image + "/";
void openBrowser(string a, string b)
{
System.Diagnostics.Process.Start(website + a);
System.Diagnostics.Process.Start(website + b);
}
openBrowser(HD, SD);
Console.Read();
}
}
}
}