static HtmlState GetLoginState() { HtmlState state = new HtmlState(); var res = client.GetAsync(url).Result; var html = res.Content.ReadAsStringAsync().Result; state.ip = Regex.Match(html, "(?<=<input type=\"hidden\" name=\"user_ip\" id=\"user_ip\" value=\").*(?=\">)").ToString(); state.username = Regex.Match(html, "(?<=<input type=\"hidden\" name=\"username\" id=\"username\" value=\").*(?=\">)").ToString(); return(state); }
public static void BEGIN_STATE(HtmlState stateName, HtmlStateHandler handler) { }