Ignore "usemap" attribute on images

This commit is contained in:
Tobias Gruetzmacher 2022-06-06 14:11:07 +02:00
parent aca51b3a8e
commit 67d1ee281b

View file

@ -12,7 +12,7 @@ from urllib.parse import urljoin
from typing import Collection, Dict, List, Optional, Type, Union, Pattern, Sequence from typing import Collection, Dict, List, Optional, Type, Union, Pattern, Sequence
import lxml import lxml
from lxml.html.defs import link_attrs as html_link_attrs from lxml.html.defs import link_attrs as lxml_link_attrs
try: try:
import cssselect import cssselect
@ -34,6 +34,7 @@ from .xml import NS
ARCHIVE_ORG_URL = re.compile(r'https?://web\.archive\.org/web/[^/]*/') ARCHIVE_ORG_URL = re.compile(r'https?://web\.archive\.org/web/[^/]*/')
html_link_attrs = lxml_link_attrs - {'usemap'}
if lxml.etree.LIBXML_VERSION < (2, 9, 3): if lxml.etree.LIBXML_VERSION < (2, 9, 3):