Skip to content

Commit

Permalink
fix: crawler strategy exception handling and fixes (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
NanmiCoder authored Nov 20, 2024
1 parent d418a04 commit 3439f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crawl4ai/crawler_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def crawl(self, url: str, **kwargs) -> str:
print(f"[LOG] ✅ Crawled {url} successfully!")

return html
except InvalidArgumentException:
except InvalidArgumentException as e:
if not hasattr(e, 'msg'):
e.msg = sanitize_input_encode(str(e))
raise InvalidArgumentException(f"Failed to crawl {url}: {e.msg}")
Expand Down

0 comments on commit 3439f78

Please sign in to comment.