Sub dropbox_info()
Dim http As New XMLHTTP60, str_items As Variant
Dim oPath As String: oPath = "C:\Test\drop1.txt"
Dim intFF As Integer: intFF = FreeFile()
With http
.Open "GET", "https://www.dropbox.com/sh/v4zcawgs32v7qc9/AAALfDRjpNOT8NnOTL_4XAXja?dl=0", False
.send
str_items = .responseText
End With
Open oPath For Output As #intFF
Print #intFF, str_items
Close #intFF
End Sub
Sub dropbox_info()
Dim http As New XMLHTTP60, str_items As Variant
Dim oPath As String: oPath = "C:\Test\drop1.txt"
Dim m As Object, mymatches As Object
With http
.Open "GET", "https://www.dropbox.com/sh/v4zcawgs32v7qc9/AAALfDRjpNOT8NnOTL_4XAXja?dl=0", False
.send
str_items = .responseText
End With
With CreateObject("VBScript.RegExp")
.Pattern = "(url\"": \"")(https:\/\/www.dropbox.com\/sh\/.{1,99})(\"", \""ownerName)"
.Global = True
Set mymatches = .Execute(str_items)
For Each m In mymatches
Debug.Print m.SubMatches(1)
Next
End With
End Sub
Sub DemoReq()
With CreateObject("WinHttp.WinHttpRequest.5.1")
.Open "GET", "https://www.dropbox.com/sh/v4zcawgs32v7qc9/AAALfDRjpNOT8NnOTL_4XAXja?dl=0", False
.setRequestHeader "DNT", "1"
On Error Resume Next
.send
If .Status = 200 Then V = Split(.responseText, """filename"": """)
On Error GoTo 0
End With
If IsArray(V) Then
For N& = 1 To UBound(V) - 1
Debug.Print N; ": "; Split(V(N), """")(0); vbLf; Tab(6); Split(Split(V(N), """href"": """)(1), """")(0)
Next
End If
End Sub