From 73869de51c9d3c2ea12f36cf416adad0d350a679 Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: 2024年3月12日 22:54:56 +0000 Subject: [PATCH] Limit readline() --- News-Voice-Assistant/news_assistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/News-Voice-Assistant/news_assistant.py b/News-Voice-Assistant/news_assistant.py index a9c37f84e8..5201c2b6ca 100644 --- a/News-Voice-Assistant/news_assistant.py +++ b/News-Voice-Assistant/news_assistant.py @@ -28,7 +28,7 @@ def speak(text: str): if __name__ == '__main__': with open("api_key.txt", "r") as file: - api_key = file.readline() + api_key = file.readline(5_000_000) newsapi = newsapi.NewsApiClient(api_key=api_key) headlines = fetch_news()

AltStyle によって変換されたページ (->オリジナル) /