The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tweets
#1
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:
Code:
Copy      Help
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)