aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2012-01-05 11:08:50 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2012-01-05 11:08:50 +0100
commit47a53c9e46a232275e012ea368669d02816e7d85 (patch)
tree14d1c22d5f074ac783d1eb8047f5993f9dd3a63e
parent1413cd87ebe7297aa48fae43bce9c92a751641fb (diff)
release 2012.01.052012.01.05
-rw-r--r--LATEST_VERSION2
-rwxr-xr-xyoutube-dl19
-rwxr-xr-xyoutube_dl/__init__.py2
3 files changed, 15 insertions, 8 deletions
diff --git a/LATEST_VERSION b/LATEST_VERSION
index d3d78fa6e..0c82f59b5 100644
--- a/LATEST_VERSION
+++ b/LATEST_VERSION
@@ -1 +1 @@
-2011.12.18
+2012.01.05
diff --git a/youtube-dl b/youtube-dl
index 2522e0233..818a3a73a 100755
--- a/youtube-dl
+++ b/youtube-dl
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-__author__ = (
+__authors__ = (
'Ricardo Garcia Gonzalez',
'Danny Colligan',
'Benjamin Johnson',
@@ -18,7 +18,7 @@ __author__ = (
)
__license__ = 'Public Domain'
-__version__ = '2011.12.18'
+__version__ = '2012.01.05'
UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl'
@@ -290,6 +290,15 @@ def _orderedSet(iterable):
res.append(el)
return res
+def _unescapeHTML(s):
+ """
+ @param s a string (of type unicode)
+ """
+ assert type(s) == type(u'')
+
+ htmlParser = HTMLParser.HTMLParser()
+ return htmlParser.unescape(s)
+
class DownloadError(Exception):
"""Download Error exception.
@@ -1590,8 +1599,6 @@ class DailymotionIE(InfoExtractor):
self._downloader.to_screen(u'[dailymotion] %s: Extracting information' % video_id)
def _real_extract(self, url):
- htmlParser = HTMLParser.HTMLParser()
-
# Extract id and simplified title from URL
mobj = re.match(self._VALID_URL, url)
if mobj is None:
@@ -1635,7 +1642,7 @@ class DailymotionIE(InfoExtractor):
if mobj is None:
self._downloader.trouble(u'ERROR: unable to extract title')
return
- video_title = htmlParser.unescape(mobj.group('title')).decode('utf-8')
+ video_title = _unescapeHTML(mobj.group('title').decode('utf-8'))
video_title = sanitize_title(video_title)
simple_title = _simplify_title(video_title)
@@ -3151,7 +3158,7 @@ class ComedyCentralIE(InfoExtractor):
return
epTitle = mobj.group('episode')
- mMovieParams = re.findall('<param name="movie" value="(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"/>', html)
+ mMovieParams = re.findall('(?:<param name="movie" value="|var url = ")(http://media.mtvnservices.com/([^"]*episode.*?:.*?))"', html)
if len(mMovieParams) == 0:
self._downloader.trouble(u'ERROR: unable to find Flash URL in webpage ' + url)
return
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index fef2afe17..818a3a73a 100755
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -18,7 +18,7 @@ __authors__ = (
)
__license__ = 'Public Domain'
-__version__ = '2011.12.18'
+__version__ = '2012.01.05'
UPDATE_URL = 'https://raw.github.com/rg3/youtube-dl/master/youtube-dl'