From f92fb7ad3013fa89986d4d0442b17101b9a08795 Mon Sep 17 00:00:00 2001 From: tyler Date: Fri, 30 Dec 2022 22:58:28 +0000 Subject: [PATCH] Improve Randomness of random verse selection not dependent on system clock. --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 9db1fda..cd21478 100644 --- a/app.py +++ b/app.py @@ -56,14 +56,14 @@ def test(): # json @app.get("/random") def random_verse_json(): - scripture = random.choice(kjv)['field'] + scripture = random.SystemRandom().choice(kjv)['field'] return(respond_json(scripture)) # plain @app.get("/t/random") def random_verse_plain(): - scripture = random.choice(kjv)['field'] + scripture = random.SystemRandom().choice(kjv)['field'] return(respond_text(scripture))