Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Dim IE As Object
  2. Dim dd As Variant
  3.  
  4.  
  5. Set IE = CreateObject("InternetExplorer.Application")
  6. IE.Visible = False
  7. IE.navigate "https://www.top40.nl/top40/2017/week-14"
  8.  
  9.  
  10.  
  11. Do While IE.Busy
  12. DoEvents
  13. Loop
  14.  
  15.  
  16. dd = IE.Document.getElementsByClassName("top40")(0).InnerText
  17.  
  18. Set IE = Nothing
  19. Set objElement = Nothing
  20. Set objCollection = Nothing
  21.  
  22. Dim Element As IHTMLElement
  23. Dim i As integer
  24. Dim artist as String
  25. Dim position As Integer
  26. For i=0 To IE.Document.getElementsByClassName("top40")(0).Children.Count
  27. position = IE.Document.getElementsByClassName("top40")(0).Childnodes(i).childnodes(0).innertext
  28. artist = IE.Document.getElementsByClassName("top40")(0).Childnodes(i).childnodes(2).Childnodes(3).childnodes(1).Childnodes(1).innertext
  29. Next i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement