Skip to content

Commit

Permalink
fix(scrapers.utils): save_response now dumps json dict to string
Browse files Browse the repository at this point in the history
solves #4808
  • Loading branch information
grossir committed Dec 11, 2024
1 parent 4d0e798 commit c968c6d
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 c968c6d

Please sign in to comment.