From d0b54a0a9f2b80312935db11e279fc9eb89a014f Mon Sep 17 00:00:00 2001 From: Gator Date: Tue, 12 Nov 2013 14:48:08 +0100 Subject: [PATCH] enable download of HQ version --- youtube_dl/extractor/escapist.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/escapist.py b/youtube_dl/extractor/escapist.py index 3aa2da52c..a0ef490a3 100644 --- a/youtube_dl/extractor/escapist.py +++ b/youtube_dl/extractor/escapist.py @@ -11,7 +11,7 @@ from ..utils import ( class EscapistIE(InfoExtractor): - _VALID_URL = r'^(https?://)?(www\.)?escapistmagazine\.com/videos/view/(?P[^/]+)/(?P[^/?]+)[/?]?.*$' + _VALID_URL = r'^(https?://)?(www\.)?escapistmagazine\.com/videos/view/(?P[^/]+)/(?P[^/?]+)(?P\?hq=1)?.*$' _TEST = { u'url': u'http://www.escapistmagazine.com/videos/view/the-escapist-presents/6618-Breaking-Down-Baldurs-Gate', u'file': u'6618-Breaking-Down-Baldurs-Gate.mp4', @@ -29,6 +29,7 @@ class EscapistIE(InfoExtractor): raise ExtractorError(u'Invalid URL: %s' % url) showName = mobj.group('showname') videoId = mobj.group('episode') + isHQ = mobj.group('hq') self.report_extraction(videoId) webpage = self._download_webpage(url, videoId) @@ -43,6 +44,8 @@ class EscapistIE(InfoExtractor): configUrl = self._search_regex('config=(.*)$', playerUrl, u'config url') configUrl = compat_urllib_parse.unquote(configUrl) + if isHQ: + configUrl = configUrl + '&hq=1' if '?' in configUrl else configUrl + '?hq=1' configJSON = self._download_webpage(configUrl, videoId, u'Downloading configuration',