summaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/compat.py
diff options
context:
space:
mode:
authorremitamine <[email protected]>2016-03-16 13:16:27 +0100
committerremitamine <[email protected]>2016-03-16 13:16:27 +0100
commit83548824c29ccdf53a4659260aa3898939833882 (patch)
treeec72d6a8943e467ca0eda8c81f17e06de6740b88 /youtube_dl/compat.py
parent354dbbd8808dc5e835c7042f84c175eb56e0bcfc (diff)
parent8bb56eeeea8154f811076c0a9093203fab224003 (diff)
downloadyoutube-dl-83548824c29ccdf53a4659260aa3898939833882.tar.gz
youtube-dl-83548824c29ccdf53a4659260aa3898939833882.zip
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.py6
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',