From c968c6d1ceca581786dbb0250cf5690b30285b2e Mon Sep 17 00:00:00 2001 From: Gianfranco Rossi Date: Tue, 10 Dec 2024 21:10:43 -0500 Subject: [PATCH] fix(scrapers.utils): save_response now dumps json dict to string solves https://github.com/freelawproject/courtlistener/issues/4808 --- cl/scrapers/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl/scrapers/utils.py b/cl/scrapers/utils.py index 7631ffbc6d..7f7d6123ee 100644 --- a/cl/scrapers/utils.py +++ b/cl/scrapers/utils.py @@ -475,7 +475,7 @@ def save_response(site: AbstractSite) -> None: try: # both tests for and parses JSON content - content = json.loads(response.content) + content = json.dumps(json.loads(response.content), indent=4) extension = "json" except (UnicodeDecodeError, json.decoder.JSONDecodeError): content = response.content