diff --git a/scrapling/core/custom_types.py b/scrapling/core/custom_types.py index 67e4e00..6d09592 100644 --- a/scrapling/core/custom_types.py +++ b/scrapling/core/custom_types.py @@ -19,9 +19,7 @@ class TextHandler(str): __slots__ = () def __new__(cls, string): - if isinstance(string, str): - return super().__new__(cls, string) - return super().__new__(cls, '') + return super().__new__(cls, str(string)) def __getitem__(self, key: Union[SupportsIndex, slice]) -> "TextHandler": lst = super().__getitem__(key)