twitter4j - setSince and setUntil don't work -


i'm having problem filter tweets specifics dates, using setuntil come no tweets, using setsince come tweets.. code following , after output result..

public void readtweetfromkeyword(string keywordstring) throws twitterexception {     twitter4j.query query =new twitter4j.query("#clt20");     queryresult result;      query.setsince("2014-12-12");      int cont = 0;      result = twitter.search(query);     (status status : result.gettweets() )     {         system.out.print("original "+status.getid());         system.out.println("\t\tdata "+status.getcreatedat());          if(!status.gettext().substring(0, 2).equals("rt")){             system.out.println(status.gettext());             cont++;         }     }     system.out.println(result.gettweets().size());     system.out.println("cont = "+cont);     return;      } 

console:

original 619433499116896256 data fri jul 10 06:10:29 gmt-03:00 2015 if @bcci looking alternative #clt20, how league of teams consisting of indian players ?

original 619408117495939072 data fri jul 10 04:29:37 gmt-03:00 2015 #test, #odi, #t20i, #ipl, #clt20 live record, score, history shedule ke lia, follow @ptv_sportsone snt 40404.

original 619330143258050560 data thu jul 09 23:19:47 gmt-03:00 2015 need 66 6 balls. kinda impossible #clt20

original 619301555532120065 data thu jul 09 21:26:11 gmt-03:00 2015 kamran akmals feet stuck #soshit #clt20

original 619095093962608640 data thu jul 09 07:45:47 gmt-03:00 2015

original 619095079983017984 data thu jul 09 07:45:43 gmt-03:00 2015

original 619095051524665344 data thu jul 09 07:45:37 gmt-03:00 2015

original 619095028304973825 data thu jul 09 07:45:31 gmt-03:00 2015

original 619094989943902209 data thu jul 09 07:45:22 gmt-03:00 2015

original 619094910516400129 data thu jul 09 07:45:03 gmt-03:00 2015

original 619094893441363969 data thu jul 09 07:44:59 gmt-03:00 2015

original 619035151578722304 data thu jul 09 03:47:35 gmt-03:00 2015 @abhisek_taneja games r played in himachal pradesh every year if u go through schedule of #ipl & #clt20 properly

original 618914815730290688 data wed jul 08 19:49:25 gmt-03:00 2015

original 618908444939186177 data wed jul 08 19:24:06 gmt-03:00 2015

original 618862474687705088 data wed jul 08 16:21:26 gmt-03:00 2015 #t20 follower , @clt20 should oganized #clt20

15 cont = 6

thanks lot!!

if set until date kepp in mind the documentation

returns tweets generated before given date. date should formatted yyyy-mm-dd. keep in mind search index may not go far date specify here.

and too

before getting involved, it’s important know search api focused on relevance , not completeness. means tweets , users may missing search results. if want match completeness should consider using streaming api instead.

so, if set until date old 0 tweets, in other hand if set since date old tweets few past days in console.


Comments

Popular posts from this blog

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

sharepoint - Accessing files across a shared directory using a Windows service -