From 6684219e9f554fe1709260022eef76e6808a9f11 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 25 Jun 2020 21:12:20 +0200 Subject: [PATCH] ottimizzazione scrapertools.unescape --- core/scrapertools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/scrapertools.py b/core/scrapertools.py index 7d47fb06..08e32108 100644 --- a/core/scrapertools.py +++ b/core/scrapertools.py @@ -103,6 +103,8 @@ def unescape(text): from Fredrik Lundh http://effbot.org/zone/re-sub.htm#unescape-html """ + if not ('&' in text and ';' in text): + return text def fixup(m): text = m.group(0)