aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/twitter.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-10-18 18:08:24 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-10-18 18:08:24 +0800
commit77a54b6a658059a11de415d793588fdbfec14194 (patch)
tree1ffa7237a35f180819e497d9fe938c43cb3c33e0 /youtube_dl/extractor/twitter.py
parent575036b40504bc921b18f05bde64e0e7dceacec6 (diff)
[twitter:card] Use _html_search_regex
Diffstat (limited to 'youtube_dl/extractor/twitter.py')
-rw-r--r--youtube_dl/extractor/twitter.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/youtube_dl/extractor/twitter.py b/youtube_dl/extractor/twitter.py
index 6b3b39aee..1cdca544c 100644
--- a/youtube_dl/extractor/twitter.py
+++ b/youtube_dl/extractor/twitter.py
@@ -7,7 +7,6 @@ from .common import InfoExtractor
from ..compat import compat_urllib_request
from ..utils import (
float_or_none,
- unescapeHTML,
xpath_text,
remove_end,
)
@@ -57,9 +56,8 @@ class TwitterCardIE(InfoExtractor):
request.add_header('User-Agent', user_agent)
webpage = self._download_webpage(request, video_id)
- config = self._parse_json(
- unescapeHTML(self._search_regex(
- r'data-player-config="([^"]+)"', webpage, 'data player config')),
+ config = self._parse_json(self._html_search_regex(
+ r'data-player-config="([^"]+)"', webpage, 'data player config'),
video_id)
if 'playlist' not in config:
if 'vmapUrl' in config: