From 2b8ee7c239b1701747b151d7bc99e4368827ecf8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Langlois Date: Mon, 23 Apr 2012 12:16:09 -0400 Subject: [PATCH 1/2] Fix for "unable to extract uploader nickname" when the class="owner" does not exists. This field is not required to download the video --- youtube-dl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/youtube-dl b/youtube-dl index 375c93e74..41bca55f7 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1752,9 +1752,11 @@ class DailymotionIE(InfoExtractor): mobj = re.search(r'(?im)[^<]+?]+?>([^<]+?)', webpage) if mobj is None: - self._downloader.trouble(u'ERROR: unable to extract uploader nickname') - return - video_uploader = mobj.group(1) + video_uploader = "Unknown" + #you need to use -i option to discard this error + self._downloader.trouble(u'WARNING: unable to extract uploader nickname') + else: + video_uploader = mobj.group(1) try: # Process video information From eda204a2dcd71b8be670252fb009eb7741749a75 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Langlois Date: Mon, 23 Apr 2012 13:05:06 -0400 Subject: [PATCH 2/2] Using class="name" when class="owner" does not exists to obtain the uploader name --- youtube-dl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/youtube-dl b/youtube-dl index 41bca55f7..59542a691 100755 --- a/youtube-dl +++ b/youtube-dl @@ -1749,11 +1749,13 @@ class DailymotionIE(InfoExtractor): video_title = _unescapeHTML(mobj.group('title').decode('utf-8')) video_title = sanitize_title(video_title) simple_title = _simplify_title(video_title) - - mobj = re.search(r'(?im)[^<]+?]+?>([^<]+?)', webpage) + + spanowner = re.search(r'(?im)[^<]+?]+?>([^<]+?)', webpage) + spanname = re.search(r'(?im)]+?>([^\>]+?)', webpage) + mobj = spanowner if spanowner else spanname if mobj is None: video_uploader = "Unknown" - #you need to use -i option to discard this error + #you need to use -i option to discard this error and continue with the download self._downloader.trouble(u'WARNING: unable to extract uploader nickname') else: video_uploader = mobj.group(1)