Skip to content

🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev

style: remove unused code

Karim shoairf93348b91591
diff --git a/scrapling/core/utils.py b/scrapling/core/utils.py
index 5c2d245..5607f8d 100644
--- a/scrapling/core/utils.py
+++ b/scrapling/core/utils.py
@@ -2,7 +2,6 @@ import logging
from itertools import chain
from re import compile as re_compile
-from orjson import loads as orjson_loads, JSONDecodeError
from lxml import html
from scrapling.core._types import Any, Dict, Iterable, List
@@ -42,17 +41,6 @@ def setup_logger():
log = setup_logger()
-def is_jsonable(content: bytes | str) -> bool:
- if isinstance(content, bytes):
- content = content.decode()
-
- try:
- _ = orjson_loads(content)
- return True
- except JSONDecodeError:
- return False
-
-
def flatten(lst: Iterable[Any]) -> List[Any]:
return list(chain.from_iterable(lst))