以下代码打开多个链接(wistia链接)
Private bot As New Selenium.ChromeDriver
Sub Test()
Dim arr(), ws As Worksheet, i As Long
Set bot = New ChromeDriver
Set ws = ThisWorkbook.Worksheets("Links")
arr = Application.Transpose(ws.Range("A2:A" & ws.Cells(Rows.Count, 1).End(xlUp).Row))
Rem https://fast.wistia.net/embed/iframe/n3tweojtus
With bot
.Start "Chrome"
.Get arr(1)
For i = LBound(arr) + 1 To UBound(arr)
If Not IsEmpty(arr(i)) Then
.ExecuteScript "window.open(arguments[0])", arr(i)
.SwitchToNextWindow
End If
Next i
End With
End Sub
如何将视频保存到磁盘..? 我注意到IDM面板没有出现在硒驱动程序中。 下载多个链接的最简单方法是什么(链接位于A2:A和最后一行)?
我已经尝试过这一行
With bot
.AddExtension ThisWorkbook.Path & "\extension_6_33_2_0.crx"
我注意到扩展已添加,但是代码挂起并且没有打开任何现有链接