Chamuanza Posted March 18, 2012 at 04:16 PM Report Share #444462 Posted March 18, 2012 at 04:16 PM Um Bem Aja a todos Mais uma vez venho pedir ajuda Encontrei este código no Forum e queria sacar a data do sorteio que se encontra na linha (520) do array "leitor" mas não consigo. Alguem me dá uma dica? Dim oWebRequest As WebRequest Dim oWebResponse As WebResponse = Nothing Dim strBuffer As String = "" Dim objSR As StreamReader = Nothing Dim leitor As Object Dim ler As Boolean = False Dim valores As String = String.Empty Dim i As Integer = 0 Dim num_final As String = String.Empty Dim estrela_final As String = String.Empty 'conecta com o website Try oWebRequest = HttpWebRequest.Create("https://www.jogossantacasa.pt/web/SCCartazResult/euroMilhoes") oWebResponse = oWebRequest.GetResponse() 'Le a resposta do web site e armazena em uma stream objSR = New StreamReader(oWebResponse.GetResponseStream) strBuffer = objSR.ReadToEnd leitor = Split(strBuffer, vbNewLine) For Each linha In leitor If ler = True Then valores += linha.ToString + vbNewLine i += 1 End If 'If linha.Contains("Ordem Saída:") Then ' ler = True 'End If If linha.Contains("Chave:") Then ler = True End If If i > 8 Then ler = False End If Next Catch ex As Exception MsgBox(ex.ToString) Finally objSR.Close() oWebResponse.Close() End Try Depois tentarei colocar o resultado na msgbox Obrigado desde já pela atenção Link to comment Share on other sites More sharing options...
Andrepereira9 Posted March 18, 2012 at 04:36 PM Report Share #444463 Posted March 18, 2012 at 04:36 PM Boas If linha.Contains("Data do sorteio:") Then MsgBox(linha.ToString) End If A informática chegou para resolver problemas que antes não existiam Quem ri por último é porque está conectado a 52 Kbs. Link to comment Share on other sites More sharing options...
Chamuanza Posted March 18, 2012 at 05:47 PM Author Report Share #444473 Posted March 18, 2012 at 05:47 PM Oi Andre Obrigado pela atenção O resultado da mensagem é: <td class="TDcinza2" width="289" height="25" valign="middle" align="center"> Data do sorteio: 16/03/2012</td>" como passo o valor da data para uma variavel ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now