Private Sub CommandButton2_Click()
Dim ie, items, elem As Object
Dim i, j, k, l As Integer
i = 2
k = 2
l = 2
Set ie = CreateObject("Internetexplorer.application")
ie.Visible = True
ie.navigate "https://www.amazon.com/gp/pdp/profile/A3NEAETOSXDBOM/"
Do While ie.busy Or ie.readystate <> 4
Loop
For i = 0 To 500
On Error Resume Next
Range("A" & i).Value = ie.document.getelementsbytagname("a").Item(i).innertext
Next i
End Sub
我基本上希望从页面左侧显示的网站中检索电子邮件地址为&#34;发送电子邮件&#34; &安培;点击后会显示电子邮件地址。
注意:您必须登录才能查看发送电子邮件选项。
请帮忙。
答案 0 :(得分:0)
在End Sub之前添加以下代码:
Set sendAnEmail = ie.Document.getElementsByClassName("a-link-normal pr-email").Item(0)
sendAnEmail.Click
Application.Wait Now + TimeSerial(0, 0, 2)
retrievedEmail = sendAnEmail.innerText
MsgBox retrievedEmail
但是,您应该看一下亚马逊关于网络报道的政治,因为这不是100%合法