Explorar el Código

[compat] Import html5 entities correctly

Yen Chi Hsuan hace 9 años
padre
commit
836ab0c554
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      youtube_dl/compat.py

+ 2 - 2
youtube_dl/compat.py

@@ -64,8 +64,8 @@ except ImportError:  # Python 2
     import htmlentitydefs as compat_html_entities
 
 try:  # Python >= 3.3
-    from compat_html_entities import html as compat_html_entities_html5
-except ImportError:
+    compat_html_entities_html5 = compat_html_entities.html5
+except AttributeError:
     # Copied from CPython 3.5.1 html/entities.py
     compat_html_entities_html5 = {
         'Aacute': '\xc1',