Merge remote-tracking branch 'jaimeMF/yt-playlists'
[youtube-dl] / youtube_dl / extractor / escapist.py
index f9681fd436944ec7fa937d96e57a1d30ed63aefc..b1242f6bc457a41a9c8413eb851671acd05cc8c0 100644 (file)
@@ -35,13 +35,13 @@ class EscapistIE(InfoExtractor):
             r'<meta name="description" content="([^"]*)"',
             webpage, u'description', fatal=False)
 
-        playerUrl = self._og_search_video_url(webpage, name='player url')
+        playerUrl = self._og_search_video_url(webpage, name=u'player URL')
 
         title = self._html_search_regex(
-            'r<meta name="title" content="([^"]*)"',
-            webpage, u'player url').split(' : ')[-1]
+            r'<meta name="title" content="([^"]*)"',
+            webpage, u'title').split(' : ')[-1]
 
-        configUrl = self._search_regex('config=(.*)$', playerUrl, u'config url')
+        configUrl = self._search_regex('config=(.*)$', playerUrl, u'config URL')
         configUrl = compat_urllib_parse.unquote(configUrl)
 
         formats = []
@@ -66,13 +66,12 @@ class EscapistIE(InfoExtractor):
             })
 
         _add_format(u'normal', configUrl)
+        hq_url = (configUrl +
+                  ('&hq=1' if '?' in configUrl else configUrl + '?hq=1'))
         try:
-            hq_url = (configUrl +
-                      ('&hq=1' if '?' in configUrl else configUrl + '?hq=1'))
-            try:
-                _add_format(u'hq', hq_url)
-            except ExtractorError:
-                pass  # That's fine, we'll just use normal quality
+            _add_format(u'hq', hq_url)
+        except ExtractorError:
+            pass  # That's fine, we'll just use normal quality
 
         return {
             'id': videoId,