1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Dim Pattern As String
Pattern = "<a HREF=""/serie-[0-9]*-BD-[a-zA-Z0-9-:'!ü,ç@°...\(+\)+\\+\[+\]+\/+\&+\x9C+\x2B+\x8C+\x40+\x3D+\+\x24+\xB2+\
+\x2A+]*.html"" TARGET=""_top"" alt=""[a-zA-Z0-9-:!?@°',%...ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÌÍÎÏìíîïÙÚÛÜùúûüÿÑñÇç\s+\(+\)+\\+\[+\]+\/+\&+\x9C+\x2B+\x40+\x3D+\x8C+\x24+\xB2+\
+\x2A+]*"" title=""[a-zA-Z0-9-:!?°',%...ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÌÍÎÏìíîïÙÚÛÜùúûüÿÑñÇç\s+\(+\)+\\+\[+\]+\/+\&+\x9C+\x2B+\x40+\x8C+\x3D+\x24+\xB2+\
+\x2A+]*"" >(.*)</a>"
Dim rx As New Text.RegularExpressions.Regex(Pattern, RegexOptions.IgnoreCase)
Dim matches As MatchCollection = rx.Matches(result)
If matches.Count.ToString = 0 Then
MsgBox("Aucune série trouvée.", MsgBoxStyle.Information, "Film - Ty")
Me.Cursor = Cursors.Default
Exit Sub
End If
Dim guillement As String = """"
If matches.Count.ToString = 1 Then
Dim Value1Result As String = matches.Item(0).Value.ToString
If matches1.Count.ToString = 0 Then
Value2Result = "ND"
Else
Value2Result = matches1.Item(0).Value.ToString
End If
Dim MaRegex As New System.Text.RegularExpressions.Regex("")
Dim Value1 As String
Value1 = System.Text.RegularExpressions.Regex.Replace(Value1Result, "(<[^>]*>)", "")
Value1 = System.Text.RegularExpressions.Regex.Replace(Value1, "%2B", "\+")
Value1 = Value1.Replace("&", "&")
Value1 = Value1.Replace("x9C", "")
Value1 = Value1.Replace(" "e ;", "f")
Dim item1 As New ListViewItem(1)
item1.SubItems.Add(Value1)
Me.LvResults.Items.AddRange(New ListViewItem() {item1})
Else
For i As Short = 0 To matches.Count.ToString - 1
Dim MaRegex As New System.Text.RegularExpressions.Regex("")
Dim Value1 As String
Value1 = System.Text.RegularExpressions.Regex.Replace(matches(i).Value, "(<[^>]+>)", "")
Value1 = System.Text.RegularExpressions.Regex.Replace(Value1, "\x9C", "")
Value1 = System.Text.RegularExpressions.Regex.Replace(Value1, "\x8C", "")
Value1 = Value1.Replace(""e;", guillement)
Value1 = Value1.Replace("%2B", "\+")
Value1 = Value1.Replace("&", "&")
Dim item1 As New ListViewItem(i + 1)
item1.SubItems.Add(Value1)
Me.LvResults.Items.AddRange(New ListViewItem() {item1})
Next
End If |
Partager