protected void Button1_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(TextWeburl.Text)) { try { string url = string.Empty; url = "https://twitter.com/search?q=" + TextWeburl.Text + "&src=typd"; var getHtmlDoc = new HtmlWeb(); var document = getHtmlDoc.Load(url); var tags = document.DocumentNode.SelectNodes("//p"); if (tags != null) { foreach (var sitetag in tags) { //txtFull.Text += sitetag.InnerText + "\n"; if (sitetag.Attributes.Count != 0) { if (sitetag.Attributes["Class"].Value == "js-tweet-text tweet-text") txtFull.Text += sitetag.InnerText + "\n" + "\n"; } } } } catch (FileNotFoundException ex) { throw ex; } catch (SyntaxErrorException ex) { throw ex; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)