From 783934c8bafc0fdb8dca89fbbec4a0bb862b07d7 Mon Sep 17 00:00:00 2001 From: vivodi <103735539+vivodi@users.noreply.github.com> Date: Thu, 30 Jul 2026 12:11:38 +0800 Subject: [PATCH] Fix DeprecationWarning: chardet.universaldetector is deprecated --- html5lib/_inputstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html5lib/_inputstream.py b/html5lib/_inputstream.py index a93b5a4e..10194d3f 100644 --- a/html5lib/_inputstream.py +++ b/html5lib/_inputstream.py @@ -483,7 +483,7 @@ def determineEncoding(self, chardet=True): # Guess with chardet, if available if chardet: try: - from chardet.universaldetector import UniversalDetector + from chardet import UniversalDetector except ImportError: pass else: