using System.Collections.Generic;
using System.Diagnostics;
public static void Main()
using(WebClient client = new WebClient()){
htmlCode = client.DownloadString("https://www.palabrasque.com//palabra-aleatoria.php?Submit=Nueva+palabra");
byte[] bytes = Encoding.Default.GetBytes(getBetween(htmlCode,"/><b>","</b></font> </font></p>"));
htmlCode = Encoding.UTF8.GetString(bytes);
public static string getBetween(string strSource, string strStart, string strEnd)
if (strSource.Contains(strStart) && strSource.Contains(strEnd))
Start = strSource.IndexOf(strStart, 0) + strStart.Length;
End = strSource.IndexOf(strEnd, Start);
return strSource.Substring(Start, End - Start);