Browse Source

Add encoding to jukebox IE and simplify it a little bit

rtmp_test
Philipp Hagemeister 12 years ago
parent
commit
db241e8645
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      youtube_dl/extractor/jukebox.py

+ 1
- 3
youtube_dl/extractor/jukebox.py View File

@ -1,3 +1,4 @@
# coding: utf-8
import re
from .common import InfoExtractor
@ -13,12 +14,9 @@ class JukeboxIE(InfoExtractor):
_TITLE = r'<h1 class="inline">(?P<title>[^<]+)</h1>.*<span id="infos_article_artist">(?P<artist>[^<]+)</span>'
_NOT_AVAILABLE = r'<span>Este video no está disponible por el momento [!]</span>'
_IS_YOUTUBE = r'config":{"file":"(?P<youtube_url>http:[\\][/][\\][/]www[.]youtube[.]com[\\][/]watch[?]v=[^"]+)"'
IE_NAME = u'jukebox'
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
if mobj is None:
raise ExtractorError(u'Invalid URL: %s' % url)
video_id = mobj.group('video_id')
html = self._download_webpage(url, video_id)


Loading…
Cancel
Save