diff options
author | remitamine <remitamine@gmail.com> | 2016-03-16 13:16:27 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2016-03-16 13:16:27 +0100 |
commit | 83548824c29ccdf53a4659260aa3898939833882 (patch) | |
tree | ec72d6a8943e467ca0eda8c81f17e06de6740b88 /youtube_dl/compat.py | |
parent | 354dbbd8808dc5e835c7042f84c175eb56e0bcfc (diff) | |
parent | 8bb56eeeea8154f811076c0a9093203fab224003 (diff) |
Merge pull request #8092 from bpfoley/twitter-thumbnail
[utils] Add extract_attributes for extracting html tag attributes
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r-- | youtube_dl/compat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 2771fb5fa..74702786a 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -77,6 +77,11 @@ try: except ImportError: # Python 2 from urllib import urlretrieve as compat_urlretrieve +try: + from html.parser import HTMLParser as compat_HTMLParser +except ImportError: # Python 2 + from HTMLParser import HTMLParser as compat_HTMLParser + try: from subprocess import DEVNULL @@ -543,6 +548,7 @@ else: from tokenize import generate_tokens as compat_tokenize_tokenize __all__ = [ + 'compat_HTMLParser', 'compat_HTTPError', 'compat_basestring', 'compat_chr', |