For those who want to make this, make it as a console application instead of a windows form application. It's much faster. Also, this wont detect banned and/or deleted usernames. I will show an example on how to fix this below.
Code:
public void CheckList(List<string> names)
{
for(int i = 0; i < names.Count(); i++)
{
try
{
WebClient wc = new WebClient();
wc.DownloadString("https://instagram.com/" + names[i]);
lv_unavail.Invoke(new Action(() => lv_unavail.Items.Add(names[i])));
}
catch(Exception ex)
{
string BannedDeleted = wc.DownloadString("Put link of banned/deleted usernames, I recommend Pastebin")
if(BannedDeleted.Contains(names[i]))
{
// Not available
}
else
{
lv_avail.Invoke(new Action(() => lv_avail.Items.Add(names[i]))); // Available
}
}
}
}
Okay, so... In the try catch statement, when a username is available it will run the if else statement, checking the inputted link to see if the name exists on the page. If it does, it's banned/deleted, if it's not, it will show as available. Keep in mind that you will need a banned/deleted usernames list for this to work. Message me if anyone needs help.