Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
MooshiMochi committed Feb 16, 2024
1 parent 1971b1d commit c3269ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/apis/flaresolverr.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def get(
response = await CachedResponse(response).apply_patch(preload_data=True) # TODO: preload_data=False
self.manager.session.save_to_cache(url, response, cache_time=cache_time)
try:
status_code = response.get("solution", {}).get("status", 200)
status_code = (await response.json()).get("solution", {}).get("status", 200)
# need isinstance check because status code may be 'error' or 'ok'
if isinstance(status_code, int) and 400 <= status_code <= 499:
self.manager.bot.logger.error(f"[FlareSolverr] Error: {status_code}")
Expand Down

0 comments on commit c3269ed

Please sign in to comment.