I am using the Twitter's premium API to download tweets restricted to a particular country and language. In order to do this, I am using search tweets, which access the mentioned premium API. However, when I collect the tweets I received an empty list.
I am starting by restricting the search to a given language ('es'), as shown below, and a string. However, this query produces zero matches. When I tried the same but removing the language information from the rule, gen_rule_payload('cr7', from_date='2017-06-03', to_date='2017-06-04', results_per_call=100), it provides the expected results.
So, my question is how can I query for both language and place_country simultaneously in either searchtweets or any other python wrapper of Twitter's premium API?
Any help is greatly appreciated!
Daniel
from searchtweets import gen_rule_payload, load_credentials,
collect_results
premium_creds = load_credentials(filename="filename.yaml",
yaml_key="yaml_key",
env_overwrite=False)
rule = gen_rule_payload('cr7 lang=es',
from_date="2017-06-03",
to_date="2017-06-04",
results_per_call=100)
tweets = collect_results(rule, max_results=100,
result_stream_args=premium_creds)
[print(tweet.all_text) for tweet in tweets]
[]