11-18-2010, 12:18 AM
I need to monitor tweets from several users.
So I'd like to grab all of the users' rss feeds and then sort the data by time of post.
Here is what I whipped up to grab all the data:
I'm thinking that changing all of the dates to a int (i.e. "Fri, 14 May 2010 23:11:26 +0000" = 201005231126)
Then putting all of the data into a CSV variable and then sort by the time stamp.
Thanks,
Jimmy Vig
So I'd like to grab all of the users' rss feeds and then sort the data by time of post.
Here is what I whipped up to grab all the data:
str s=
;'NT_NewsEditor','NT_SportsEditor','NT_SpringValley','NT_Court','NT_County','NT_LifeEditor','NT_Business','NT_Peru','NT_Editor','NT_LaSalle','NT_Online','NT_PhotoEditor','NT_Photo','NT_Mendota','NT_Princeton','NT_PutnamCounty']
s.findreplace("'")
s.findreplace("," "[]")
s.findreplace("[")
s.findreplace("]")
for _i 0 numlines(s)
,_s.getl(s _i)
,_s-"http://twitter.com/"
,IntGetFile _s str'Twitter
,for int'i 0 numlines(Twitter)
,,str Line.getl(Twitter i)
,,
,,if(matchw(Line "*href=''http://twitter.com/statuses/user_timeline*.rss*"))
,,,str Title=Line
,,,str mSearch="title=''"
,,,int Mark=find(Title mSearch 0 1)
,,,Title.remove(0 Mark+mSearch.len)
,,,Mark=find(Title "'' type=''")
,,,Title.remove(Mark)
,,,
,,,Line.findreplace(" <link rel=''alternate'' href=''")
,,,int RSS=find(Line ".rss")
,,,Line.remove(RSS+4)
,,,IntGetFile Line str'rss
,,,;mes rss
,,,mkdir "$desktop$\twitter\"
,,,rss.setfile(F"$desktop$\twitter\{Title}.txt")
I'm thinking that changing all of the dates to a int (i.e. "Fri, 14 May 2010 23:11:26 +0000" = 201005231126)
Then putting all of the data into a CSV variable and then sort by the time stamp.
Thanks,
Jimmy Vig