Download innertext from html pages

Hi

this code download innertext of instagram urls

urls  >>> sheet 1 : a1 to lastrow 

but why err  in Third url

im Amateur  pls help me.

pic 🙁http://s9.picofile.com/file/8336922700/6789.png)

 

 

Sub test()

    Dim wb As Object
    Dim doc As Object
    Dim sURL As String
    Dim lastrow As Long
    Dim n As Integer
    Dim i As Integer
    Dim HtmlToText As String
    Dim result
    lastrow = Sheet1.Cells(Rows.Count, “A”).End(xlUp).Row
    For i = 2 To lastrow
       
        Set wb = CreateObject(“internetExplorer.Application”)
        sURL = Cells(i, 1)
        wb.navigate sURL
        wb.Visible = False
        While wb.Busy
          DoEvents
        Wend
        ‘HTML document
        Set doc = wb.document
        Dim Name As Variant
        Dim Posts As Variant
        Dim Following As Variant
        Dim Followers As Variant
        Dim DivValue As Variant
        Dim DivValueSplit As Variant
        Dim DivValueResult As Variant
        Dim Biography As Variant
       
       Name = doc.getElementsByClassName(“AC5d8 notranslate”)(0).innerText
        Posts = doc.getElementsByClassName(“g47SY”)(0).innerText
        Followers = doc.getElementsByClassName(“g47SY”)(1).innerText
        Following = doc.getElementsByClassName(“g47SY”)(2).innerText
       
        ‘dd = web.document.querySelector(“div.-vDIg span”).innerText
       
       DivValue = doc.getElementsByClassName(“-vDIg”)(0).innerHTML
        DivValueSplit = Split(DivValue, “<br>”)
        DivValueResult = DivValueSplit(1)
        j = InStr(DivValueResult, “</span>”)
        Biography = Mid(DivValueResult, 7, j – 7)
      Worksheets(“sheet1”).Cells(i, 2) = Name
        Worksheets(“sheet1”).Cells(i, 3) = Followers
        Worksheets(“sheet1”).Cells(i, 4) = Following
        Worksheets(“sheet1”).Cells(i, 5) = Posts
        Worksheets(“sheet1”).Cells(i, 6) = Biography
       
        Biography = Replace(re1, “<span>”, “”)
               
        Cells(i, 2) = HtmlToText
         myarray = Split(Data, vbCrLf)
err_clear:
        If Err <> 0 Then
          Err.Clear
          Resume Next
        End If
        wb.Quit
           
    Next i

End Sub

 

By: kaprio

3,636 thoughts on “Download innertext from html pages

  1. hiking

    I absolutely love your website.. Very nice colors & theme. Did you make this amazing site yourself? Please reply back as I’m wanting to create my very own website and would love to find out where you got this from or just what the theme is called. Thanks!

  2. App Smart Tv Iptv Samsung

    Ponto IPTV a melhor programacao de canais IPTV do Brasil, filmes, series, futebol, lutas, shows, documentarios em alta definicao de imagem e som em SD, HD, FULL HD, 4K. compativel com todos aparelhos do mercado Brasileiro.

  3. toko online 88

    A motivating discussion is worth comment. There’s no doubt that that you ought to write more on this issue, it might not be a taboo matter but typically folks don’t talk about these topics. To the next! Best wishes!!

  4. agen vivoslot

    I truly love your website.. Excellent colors & theme. Did you create this site yourself? Please reply back as I’m trying to create my own personal blog and would love to know where you got this from or what the theme is called. Many thanks!

  5. visit website

    Wow, superb blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is great, let alone the content!

  6. vivo slot

    Howdy! This article could not be written any better! Going through this post reminds me of my previous roommate! He constantly kept preaching about this. I’ll send this post to him. Pretty sure he will have a very good read. Many thanks for sharing!

  7. slot online

    Hey there! I just wish to give you a huge thumbs up for your excellent information you have got right here on this post. I will be coming back to your website for more soon.

  8. daftar vivo slot

    Aw, this was an exceptionally nice post. Spending some time and actual effort to produce a very good article… but what can I say… I procrastinate a lot and don’t manage to get anything done.

  9. vivoslot

    Oh my goodness! Incredible article dude! Thank you so much, However I am going through issues with your RSS. I don’t understand why I can’t subscribe to it. Is there anybody getting similar RSS problems? Anyone that knows the answer will you kindly respond? Thanx!!

  10. 谷歌优化

    Do you have a spam problem on this website; I also am
    a blogger, and I was curious about your situation; we have developed some nice practices and we are looking to
    swap solutions with other folks, be sure to shoot me an email if
    interested.

  11. dingdong togel

    You’ve made some decent points there. I looked on the net to find out more about the issue and found most individuals will go along with your views on this website.

  12. dingdong36d

    Can I simply just say what a comfort to uncover somebody that truly knows what they are talking about on the net. You certainly understand how to bring a problem to light and make it important. More people must read this and understand this side of the story. I can’t believe you are not more popular because you surely possess the gift.

  13. keluaran hk

    I blog quite often and I seriously appreciate your information. Your article has truly peaked my interest. I’m going to bookmark your site and keep checking for new details about once per week. I opted in for your RSS feed as well.

  14. bandarqq

    Howdy! This blog post couldn’t be written any better! Going through this article reminds me of my previous roommate! He continually kept talking about this. I will send this article to him. Fairly certain he will have a very good read. I appreciate you for sharing!

  15. togel sgp

    Hey there! I just wish to offer you a huge thumbs up for your great information you have got here on this post. I am coming back to your blog for more soon.

  16. bandarqq

    Right here is the perfect blog for anybody who wishes to understand this topic. You know a whole lot its almost hard to argue with you (not that I personally would want to…HaHa). You certainly put a new spin on a topic that has been discussed for decades. Wonderful stuff, just wonderful!

  17. bandarqq

    Great site you have here.. It’s hard to find high quality writing like yours nowadays. I honestly appreciate individuals like you! Take care!!

Comments are closed.