We are not paying anything for access, what I guess would be the premium search?
Here it goes part of the code. For more check https://github.com/hsharrison/tweetstash/blob/master/src/tweetstash/search.py:
search_terms = [’#’ + hashtag for hashtag in hashtags]
# filter.list
filter_path = config_path / 'filter.list'
if filter_path.is_file():
with filter_path.open(encoding='utf-8') as filter_file:
filters = filter_file.read().splitlines()
filter_terms = ['#' + hashtag for hashtag in filters]
else:
filter_terms = []
return cls(stash, auth_data, search_terms, filter_terms=filter_terms)
def search_api(self):
auth = tweepy.AppAuthHandler(*self.auth_data[:2])
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
if not api:
raise ValueError('Authentication failed')
return api
def stream_auth(self):
auth = tweepy.OAuthHandler(*self.auth_data[:2])
auth.set_access_token(*self.auth_data[2:])
return auth
def search(self, **stop_after):
if not stop_after:
stop_after['days'] = 36500
stop_delta = timedelta(**stop_after)
for hashtags in partition_all(max_hashtags_per_search, self.search_terms):
tweets = search_twitter(self.search_api(), query=' OR '.join(hashtags))