
Alguien que me ayude
Publicado por fede (3 intervenciones) el 25/06/2021 05:56:26
Necesito hacer login para sacar todo el html por request y extraer algunos datos pongo mi proyecto con url incluida:
'************************************************************************************************************************
Si alguien me puede ayudar se lo agradeceria, gracias.
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
Private Sub OBTENER_DATOS()
Try
Dim objResponse As HttpWebResponse
Dim objRequest As HttpWebRequest
'hacer login facebock
'
'
'
'
'para poder entrar en la url
objRequest = HttpWebRequest.Create("https://bsportsfan.com/rs/3586099/Deportivo-Lara-v-Academia-Puerto-Cabello")
objRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36"
objResponse = objRequest.GetResponse()
Using sr As New StreamReader(objResponse.GetResponseStream())
MIHTML_ESTADISTICAS = sr.ReadToEnd()
Dim html = New HtmlDocument()
html.LoadHtml(MIHTML_ESTADISTICAS)
For Each cell In html.DocumentNode.SelectNodes(".//html/body/div/div[1]/div[3]/div/div[4]/table")
DATOS = cell.SelectSingleNode(".//td[2]").InnerText
Next
sr.Close()
End Using
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
'************************************************************************************************************************
Si alguien me puede ayudar se lo agradeceria, gracias.
Valora esta pregunta


0