Skip to content

Commit

Permalink
feat: debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham1729 committed Dec 10, 2023
1 parent 3af5112 commit 77a8641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion applications/data_fetcher/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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}")
Expand Down

0 comments on commit 77a8641

Please sign in to comment.