number of tweets per day in a python code example
Example 1: how to find nuber of tweets per day using python
count = 0
skip = 0
r = api.request('statuses/filter', {'track':'giraffe'})
for item in r:
if 'text' in item:
count += 1
elif 'limit' in item:
skip = item['limit'].get('track')
print('*** SKIPPED %d TWEETS' % skip)
elif 'disconnect' in item:
print('[disconnect] %s' % item['disconnect'].get('reason'))
break
print(count+skip);
Example 2: how to find nuber of tweets per day using python
r = TwitterRestPager(api, 'search/tweets', {'q':'giraffe', 'count':100})
for item in r.get_iterator():
print(item['text'])