As I've mentioned, you cannot use XMLHTTP library for this URL.
Sub Test2()
' Haluk - 17/07/2020
'
Dim HTTP As Object, HTML As Object
Dim URL As String
URL = "https://www.g2a.com/pl-pl/minecraft-windows-10-edition-microsoft-key-global-i10000032198001"
Set HTTP = CreateObject("MSXML2.XMLHTTP")
Set HTML = CreateObject("HTMLFILE")
HTTP.Open "GET", URL, False
HTTP.send
MsgBox HTTP.statusText
Set HTML = Nothing
Set HTTP = Nothing
End Sub
Or, using WINHTTP class;
Sub Test3()
' Haluk - 18/07/2020
'
Dim W As Object
Dim URL As String
URL = "https://www.g2a.com/pl-pl/minecraft-windows-10-edition-microsoft-key-global-i10000032198001"
On Error Resume Next
Set W = CreateObject("winhttp.winhttprequest.5")
If Err.Number <> 0 Then
Set W = CreateObject("winhttp.winhttprequest.5.1")
End If
On Error GoTo 0
W.Open "GET", URL, False
W.Send
MsgBox W.ResponseText
Set W = Nothing
End Sub
If it was not restricted; you could get the "response text" and write to a HTML file in memory and then get the desired data from that response.
Bookmarks