So i have this code which i'm trying to find if Twitter / ? is in the source of the twitter.com/name ( to verify if the user exist) When the user exist, it works fine, when the user doesn't, it gives a 404 error and stop. is there anyway to ignore the 404 error and make it still look at the source code of that page? because if we go to ex: view-source:https://twitter.com/pogosode , it doesn't exist but we can still see the source..
foreach (Membre noms in p_nom)
{
string websiteName = "https://twitter.com/" + noms.NomMembre;
string source = (new WebClient()).DownloadString(websiteName);
if (source.Contains("<title>Twitter / ?</title>"))
{
p_disponible.Add(new MembreVerifier(noms.NomMembre));
}
}