title: C# Scrape data from wiki page (screen-scraping)
body: <p>I want to scrape a Wiki page. Specifically, <a href="http://sgwiki.com/wiki/Scania_K230UB_%28Batch_1_Euro_V%29" rel="nofollow">this one.</a></p>
  
  <p>My app will allow users to enter the registration number of the vehicle (for example, SBS8988Z) and it will display the related information (which is on the page itself).</p>
  
  <p>For example, if the user enters SBS8988Z into a text field in my application, it should look for the line on that wiki page</p>
  
  <pre><code>SBS8988Z (SLBP 192/194*) - F&amp;N NutriSoy Fresh Milk: Singapore's No. 1 Soya Milk! (2nd Gen)
  </code></pre>
  
  <p>and return SBS8988Z (SLBP 192/194*) - F&amp;N NutriSoy Fresh Milk: Singapore's No. 1 Soya Milk! (2nd Gen).</p>
  
  <p>My code so far is (copied and edited from various websites)...</p>
  
  <pre><code>WebClient getdeployment = new WebClient();
  string url = "http://sgwiki.com/wiki/Scania_K230UB_(Batch_1_Euro_V)";
  
  getdeployment.Headers["User-Agent"] = "NextBusApp/GetBusData UserAgent";
  string sgwikiresult = getdeployment.DownloadString(url); // &lt;&lt;&lt; EXCEPTION
  MessageBox.Show(sgwikiresult); //for debugging only!
  
  HtmlAgilityPack.HtmlDocument sgwikihtml = new HtmlAgilityPack.HtmlDocument();
  sgwikihtml.Load(new StreamReader(sgwikiresult));
  HtmlNode root = sgwikihtml.DocumentNode;
  
  List&lt;string&gt; anchorTags = new List&lt;string&gt;();   
  
  foreach(HtmlNode deployment in root.SelectNodes("SBS8988Z"))
  {
      string att = deployment.OuterHtml;
      anchorTags.Add(att);
  }
  </code></pre>
  
  <p>However, I am getting a an <code>ArgumentException</code> was unhandled - Illegal Characters in path.</p>
  
  <p>What is wrong with the code? Is there an easier way to do this? I'm using HtmlAgilityPack but if there is a better solution, I'd be glad to comply.</p>