Send Message on Instagram profile

流过昼夜 提交于 2020-06-29 03:53:11

问题


I am trying to create a VBA macro code, so that the Message passed in the code can send of the profile defined in the code, to every user in our profile.

I am trying doing these, by first searching the profile on Instagram and them clicking on message option and them sending the message. But i am not able to send the message to the profile.

The HTML code of text area is

<div class="Igw0E IwRSH eGOV_ vwCYk ItkAi">                                                            
    <textarea clas="" style="height: 19px;" placeholder="Message..."> 
    </textarea>
 </div>

Sub MessageGalGadot()
    Url$ = "https://www.instagram.com/motos.22.nova/"
    Dim ie As New InternetExplorer, post As Object
    Dim WebUrl As String
    Dim i As Integer

    With ie
        .Visible = True
        .Navigate Url
        While .Busy = True Or .readyState < 4: DoEvents: Wend

        While post Is Nothing
            On Error Resume Next
            Application.Wait Now + TimeValue("00:00:001")
            Set post = .Document.querySelector(".fAR91.sqdOP.L3NKy._4pI4F._8A5w5 ")
            If Not post Is Nothing Then
                post.Click
                Set msg = .Document.querySelector(".Igw0E.IwRSH.eGOV_.vwCYk.ItkAi ")
                msg.Click
                ie.Document.getElementsByName(".Igw0E.IwRSH.eGOV_.vwCYk.ItkAi").Value = "123"
            Else:
                Debug.Print "trying again"
            End If
            On Error GoTo 0
        Wend

    End With
    Stop
    ie.Quit
End Sub

来源:https://stackoverflow.com/questions/62403190/send-message-on-instagram-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!