Skip to content

Commit

Permalink
Merge pull request #4809 from freelawproject/fix_save_response
Browse files Browse the repository at this point in the history
fix(scrapers.utils): save_response now dumps json dict to string
  • Loading branch information
grossir authored Dec 11, 2024
2 parents b6d2f60 + 02ab5a0 commit d8ade2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cl/scrapers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8ade2e

Please sign in to comment.