There's no need to use Internet Explorer, rss feeds are just xml and libraries are available for parsing xml.
The twitter things is a little more complex, but not much, we just do a direct call to the twitter api passing in the url of the article, for the feedburner link from the blogspot page:
Public Sub GetData()
Const url As String = "http://feeds.feedburner.com/HubSpot?fmt=xml"
Dim oXML As Object
Dim oNodes As Object
Dim BlogTitle As String
Dim x As Long
Dim node As Object
With CreateObject("MSXML2.DOMDocument")
.Load url
Do: DoEvents: Loop Until .readystate = 4
Set oNodes = .getelementsbytagname("item")
BlogTitle = .getelementsbytagname("title").Item(0).Text
End With
ReDim Data(1 To oNodes.Length, 1 To 5)
For Each node In oNodes
With node
Data(x + 1, 1) = BlogTitle
Data(x + 1, 2) = .ChildNodes(2).Text 'Title
Data(x + 1, 3) = .ChildNodes(8).Text 'Link
Data(x + 1, 4) = .ChildNodes(6).Text 'PubDate
Data(x + 1, 5) = tweetCount(.ChildNodes(8).Text)
End With
x = x + 1
Next node
Sheet1.Cells(1, 1).Resize(UBound(Data), UBound(Data, 2)).Value = Data
End Sub
Public Function tweetCount(url As String) As Long
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", "http://cdn.api.twitter.com/1/urls/count.json?url=" & url & "&callback=twttr.receiveCount"
.send
Do: DoEvents: Loop Until .readystate = 4
On Error Resume Next
tweetCount = Val(Split(.responsetext, "ount"":")(1))
End With
End Function
Bookmarks