in
16
17 # Search for articles matching the filters
---> 18 articles = gd.article_search(f)
19
20 # Get a timeline of the number of articles matching the filters
c:\python\python37\lib\site-packages\gdeltdoc\api_client.py in article_search(self, filters)
60 articles = self._query("artlist", filters.query_string)
61
---> 62 return pd.DataFrame(articles["articles"])
63
64
KeyError: 'articles'
Example:
from gdeltdoc import GdeltDoc, Filters
from gdeltdoc import Filters, near, repeat
f = Filters( start_date = "2020-05-01", end_date = "2020-05-02", num_records = 250, keyword = "George Floyd", domain = "theguardian.com", country = "US" )
gd = GdeltDoc()
Search for articles matching the filters
articles = gd.article_search(f)
Get a timeline of the number of articles matching the filters
timeline = gd.timeline_search("timelinevol", f)
############################# Error Message ################################### KeyError Traceback (most recent call last)