title: Get First Vid From Youtube VB.NET
body: <p>Im trying to get the first youtube link from youtube or google but I can't get it to work. can someone please help me out?</p>
  
  <p><pre>Dim m As New Regex(<code>"&lt;a href=""/watch?v=.*"""</code>)</p>
  
  <p>Dim request2 As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("<a href="https://www.youtube.com/results?search_query=" rel="nofollow">https://www.youtube.com/results?search_query=</a>" + ListBox1.SelectedItem + " " + ListBox2.SelectedItem)</p>
  
  <code>    Dim responseyoutube As System.Net.HttpWebResponse = request2.GetResponse
      TextBox2.Text = (request2.Address.ToString)
      Dim sr As System.IO.StreamReader = New System.IO.StreamReader(responseyoutube.GetResponseStream())
      Dim rssourcecodey As String = sr.ReadToEnd
      Dim matches As MatchCollection = m.Matches(rssourcecodey)
      TextBox1.Text = rssourcecodey
  
      For Each itemcode2 As Match In matches
          youtube = itemcode2.Value.Split("=").GetValue(1)
  
          ListBox2.Items.Add(youtube)
  </code></pre>