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. https://ojogaptek.com

    I was excited to uncover this web site. I wanted to thank you for your time for this particularly wonderful read!! I definitely really liked every bit of it and i also have you book marked to check out new information on your site.

  2. lovestube.com

    I blog quite often and I truly appreciate your information. Your article has truly peaked my interest. I am going to book mark your site and keep checking for new details about once per week. I opted in for your RSS feed too.

  3. pokerv

    It’s difficult to find educated people on this topic, however, you sound like you know what you’re talking about! Thanks

  4. Solasbars

    Good day! I could have sworn I’ve visited this web site before but after looking at a few of the articles I realized it’s new to me. Anyhow, I’m definitely pleased I came across it and I’ll be bookmarking it and checking back frequently!

  5. sbobet online

    The next time I read a blog, I hope that it doesn’t fail me just as much as this particular one. I mean, Yes, it was my choice to read through, nonetheless I actually thought you would have something interesting to say. All I hear is a bunch of moaning about something that you could possibly fix if you were not too busy searching for attention.

  6. esports Indonesia

    Oh my goodness! Amazing article dude! Thanks, However I am going through issues with your RSS. I don’t understand the reason why I can’t subscribe to it. Is there anybody else getting similar RSS issues? Anyone that knows the solution can you kindly respond? Thanx!!

  7. Tepat.ID

    Having read this I believed it was extremely informative. I appreciate you spending some time and energy to put this informative article together. I once again find myself spending way too much time both reading and leaving comments. But so what, it was still worth it!

  8. esports Indonesia

    I would like to thank you for the efforts you’ve put in penning this site. I really hope to see the same high-grade blog posts by you in the future as well. In truth, your creative writing abilities has motivated me to get my very own website now 😉

  9. http://14.128.35.115

    Hello! I could have sworn I’ve been to this web site before but after browsing through many of the posts I realized it’s new to me. Nonetheless, I’m certainly pleased I found it and I’ll be book-marking it and checking back often!

  10. Dewabet-qq.com

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

  11. Sewa Organ Tunggal Murah

    I seriously love your site.. Excellent colors & theme. Did you build this site yourself? Please reply back as I’m hoping to create my very own site and would like to know where you got this from or exactly what the theme is called. Appreciate it!

  12. Pakar Wang

    Hello there! I simply would like to offer you a big thumbs up for the great info you’ve got right here on this post. I am coming back to your web site for more soon.

  13. Wasapdroid blog

    I blog frequently and I seriously thank you for your information. This article has really peaked my interest. I am going to bookmark your website and keep checking for new information about once a week. I subscribed to your RSS feed as well.

  14. www.ninjabandarq.org

    Hi, I do believe this is a great blog. I stumbledupon it 😉 I may return yet again since i have book marked it. Money and freedom is the best way to change, may you be rich and continue to guide others.

  15. daftar Slot deposit Pulsa

    Hi there! I know this is somewhat off-topic however I
    needed to ask. Does managing a well-established website like yours require a large amount of work?

    I am completely new to writing a blog however I do write in my journal on a daily
    basis. I’d like to start a blog so I can easily share my personal experience and views online.
    Please let me know if you have any kind of ideas or tips for brand new aspiring bloggers.
    Appreciate it!

  16. qqturbo

    Hi, I do think this is an excellent website. I stumbledupon it 😉 I may return once again since i have book-marked it. Money and freedom is the greatest way to change, may you be rich and continue to help others.

  17. Agentogelvip

    Hello there! I simply would like to offer you a huge thumbs up for your excellent information you have got right here on this post. I’ll be coming back to your site for more soon.

  18. portfolio

    Hi! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing
    many months of hard work due to no backup. Do you have
    any methods to prevent hackers?

  19. agen judi online

    The very next time I read a blog, Hopefully it won’t fail me as much as this one. After all, Yes, it was my choice to read through, but I actually believed you’d have something interesting to say. All I hear is a bunch of crying about something that you could fix if you weren’t too busy looking for attention.

  20. Latest Learnerships

    I blog often and I seriously thank you for your information. Your article has truly peaked my interest. I’m going to book mark your blog and keep checking for new details about once a week. I subscribed to your Feed too.

  21. contoh surat lamaran kerja

    The next time I read a blog, Hopefully it won’t disappoint me as much as this particular one. After all, Yes, it was my choice to read through, nonetheless I genuinely believed you would have something interesting to say. All I hear is a bunch of whining about something that you can fix if you were not too busy searching for attention.

  22. royalking4d

    Can I just say what a comfort to find someone who really understands what they’re talking about on the web. You actually understand how to bring an issue to light and make it important. More people really need to look at this and understand this side of the story. I can’t believe you are not more popular since you surely possess the gift.

Comments are closed.