fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication1
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18.  
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. webBrowser1.Navigate("http://w...content-available-to-author-only...m.com/rental/-/detail/=/cid=n_605gnbr2882r/");
  22. }
  23.  
  24.  
  25. private void button2_Click(object sender, EventArgs e)
  26. {
  27. HtmlElementCollection elemnts1 =
  28. webBrowser1.Document.Body.GetElementsByTagName("div");
  29. //List<HtmlElement> elemnts2 = new List<HtmlElement>();
  30. foreach (HtmlElement elemnt in elemnts1)
  31. {
  32. string s = elemnt.GetAttribute("className");
  33. if (String.IsNullOrEmpty(s) || !s.Equals("hd-gnav com"))
  34. continue;
  35. //elemnts2.Add(elemnt);
  36. elemnt.OuterHtml = "";
  37. }
  38. //this.Text = elemnts2.Count.ToString();
  39. }
  40. }
  41. }
  42.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty