‘获取店铺头像
Dim web As New System.Windows.Forms.WebBrowser()
web.ScriptErrorsSuppressed = True
web.Navigate("https://dianpu.ke.com/1000001000262269")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
For Each dl As object In web.Document.GetElementsByTagName("DIV")
If dl.GetAttribute("classname") = "agent-content" Then
For Each dl1 As object In dl.GetElementsByTagName("Img")
output.show(dl1.GetAttribute("src"))
Next
End If
Next
上面这个能获取到店铺头像,但是用同样方法获取不到小程序码的图片网址https://image1.ljcdn.com/params-compact/d8a2dbbfb8397845348fb2c329dd7b6f.jpeg,用法如下,获取到的居然不是,求大神帮忙解决
Dim web As New System.Windows.Forms.WebBrowser()
web.ScriptErrorsSuppressed = True
web.Navigate("https://dianpu.ke.com/1000001000262269")
Do Until web.ReadyState = 4
Application.DoEvents
Loop
For Each dl As object In web.Document.GetElementsByTagName("DIV")
If dl.GetAttribute("classname") = "wxcode-wrapper" Then
For Each dl1 As object In dl.GetElementsByTagName("Img")
output.show(dl1.GetAttribute("src"))
Next
End If
Next