I need to extract posts from a forum webpage using VBA. From code snippets on the web I have got as far as successfully extracting the text for each post. But I can't get at the poster's name. The code I'm using is:
Sub extract_forum_posts()
Dim htm As Object: Set htm = CreateObject("htmlfile")
With CreateObject("msxml2.xmlhttp")
.Open "GET", "http://community.betfair.com/your_competitions/go/thread/view/94214/30587277/division-1-thursday-17-september?sdb=1&pg=last#546245865", False
.send
htm.body.innerhtml = .responseText
End With
For Each div In htm.getElementsByTagName("div")
If div.classname Like "*flvPostContent*" Then
Debug.Print div.innertext
End If
Next div
End Sub
The poster's name seems to be part of a span element. Don't know what that is.
