From 77a8641880481ebaaea77d1585312b608162b775 Mon Sep 17 00:00:00 2001 From: gowtham1729 Date: Sun, 10 Dec 2023 17:34:45 +0900 Subject: [PATCH] feat: debug logs --- applications/data_fetcher/fetcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/data_fetcher/fetcher.py b/applications/data_fetcher/fetcher.py index 40db16c..77255ca 100644 --- a/applications/data_fetcher/fetcher.py +++ b/applications/data_fetcher/fetcher.py @@ -98,6 +98,7 @@ def to_news(self, items: Dict, tickers_list: List[str]) -> List[News]: return news def fetch_news(self): + logging.log(f"Fetching Tickers...") tickers = self.get_tickers() tickers_list = [ticker.ticker for ticker in tickers] logging.log(f"Ticker List: {tickers_list}") @@ -115,7 +116,7 @@ def fetch_news(self): news += self.to_news(response_json["data"], tickers_list) while ( - page < response_json["meta"]["found"] // response_json["meta"]["limit"] + page < 25 and page < response_json["meta"]["found"] // response_json["meta"]["limit"] ): page += 1 response = requests.get(f"{news_url}&page={page}")