어떻게 든 시즌과 에피소드의 번호를 위키 피 디아 테이블에서 두 개의 콤보 상자로 복사해야합니다. 하나는 계절 용이고 다른 하나는 에피소드 용입니다. 앱이 사용자가 상단 입력 상자에 즐겨보기를 입력 할 수 있도록 허용했습니다. 는 다음 시즌의 수에 따라 첫 번째 콤보 상자를 작성하고 사용자가 하나를 에피소드의 관련 번호를 선택하면 각 계절에 계절의 수와 에피소드의 수와 테이블Wikipedia 테이블의 정보를 콤보 상자에 복사하는 방법은 무엇입니까? Visual Basic.Net
링크 같습니다 http://en.wikipedia.org/wiki/List_of_House_episodes#Series_overview_and_ratings
을 코드 :
Public Class Form1
Dim Search As String
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Search = TextBox1.Text
Search = Search.Replace(" ", "+")
Search = "http://www.google.com/search?btnI=I'm+Feeling+Lucky&q=" & Search & "episode+list+wikipedia"
If Asc(e.KeyChar) = 13 Then
WebBrowser1.Navigate(Search)
TextBox1.Text = Search
End If
End Sub
End Class
지금까지 나는 하우투 페이지 소스도 페이지를 약간 조작 다운로드 발견했지만 나는 콤보로 계절마다 계절과 에피소드의 수를 얻기 위해 이것을 사용하는 방법을 모른다 상자. 어떤 도움도 큰 감사
것코드 :
Imports System.Text.RegularExpressions
Public Class Form1
Dim sourcecode As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
sourcecode = ((New Net.WebClient).DownloadString("http://en.wikipedia.org/wiki/List_of_House_episodes#Series_overview_and_ratings "))
Dim Code As String
Dim Information As MatchCollection = Regex.Matches(sourcecode, "<td>(.*?)</td>", RegexOptions.None)
For Each Info In Information
Code = Regex.Replace(Info.ToString, "td>", "", RegexOptions.None)
Code = Regex.Replace(Code, "</td>", "", RegexOptions.None)
MsgBox(Code)
Next
End Sub
End Class
HtmlAgilityPack을 살펴보십시오. –