2

I am new to twitter Api so I don't know its use in broader sense , actually I am crawling tweets on Ghaza for my analyses and I crawl it but just as a sample from page this is what i did

while(page<=3):
    tweets=api.GetSearch("#Egypt",per_page=100)

Now I want to crawl the data but from specific dates like I want to crawl it from 2 February 2010 to 7 march 2012.Just a clue is enough but any explanation is appreciated.

2 Answers2

1

Use [query] since:2014-02-01 until:2014-02-05 (link to docs)

Query operators

Operator                    Finds tweets…
...
superhero since:2015-07-19  containing “superhero” and sent since date “2015-07-19” (year-month-day).
ftw until:2015-07-19        containing “ftw” and sent before the date “2015-07-19”.
...
Jamie Bull
  • 12,889
  • 15
  • 77
  • 116
raditya gumay
  • 2,951
  • 3
  • 17
  • 24
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/10749700) – Ghasem Jan 02 '16 at 05:43
  • @AlexJolig I think this clear answer, you can do something like this `while(page<=3): tweets=api.GetSearch("#Egypt since:2014-02-01 until:2014-02-05t",per_page=100)` – raditya gumay Jan 04 '16 at 09:38
0

I hate to bear bad news, but this sort of search isn't supported by the current Twitter API or the Python wrapper you're using. From the documentation on the search functions:

  • The Search API is not complete index of all Tweets, but instead an index of recent Tweets. At the moment that index includes between 6-9 days of Tweets.
  • You cannot use the Search API to find Tweets older than about a week.

I wish this was possible too, but so far there's no good solution.

ecmendenhall
  • 551
  • 7
  • 14
  • You want to say that this is not possible using python or Twitter Api to crawl data from specific dates , if this , than I read a lot of search papers they did the same job what I try to do. –  Sep 07 '12 at 06:44