feat: gnews allows to specify language and country
@@ -33,8 +33,8 @@ def get_nltk_sentiment(text):
class CachedRequestsAPI:
- NEWS_SERVICE_URL = f"https://gnews.io/api/v4/search?q=TOPIC&token="
- ALL_NEWS_SERVICE_URL = f"https://gnews.io/api/v4/top-headlines?token="
+ NEWS_SERVICE_URL = f"https://gnews.io/api/v4/search?q=TOPIC&country=us&lang=en&token="
+ ALL_NEWS_SERVICE_URL = f"https://gnews.io/api/v4/top-headlines?country=us&lang=en&token="
def __init__(self, renew_freq_time=3600):
self.renew_freq_time = renew_freq_time
