ottimizzazione scrapertools.unescape

This commit is contained in:
marco
2020-06-25 21:12:20 +02:00
parent f0ec7321f3
commit 6684219e9f

View File

@@ -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)