aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/InfoExtractors.py
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2012-11-07 14:44:10 +0100
committerFilippo Valsorda <filippo.valsorda@gmail.com>2012-11-07 14:44:10 +0100
commit4cc391461ae5cb9f2626172426a10a146458aa96 (patch)
tree62a0eb8ec180636b0bb02ecf17bfe1f54e479cbb /youtube_dl/InfoExtractors.py
parentbf95333e5eee1f06271130250c5e6df4dffb8f5d (diff)
fix DailyMotion official users videos - closes #281 - by @yvestan
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rw-r--r--youtube_dl/InfoExtractors.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index a5c8b9134..cfaef2904 100644
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -694,7 +694,12 @@ class DailymotionIE(InfoExtractor):
video_uploader = u'NA'
mobj = re.search(r'(?im)<span class="owner[^\"]+?">[^<]+?<a [^>]+?>([^<]+?)</a>', webpage)
if mobj is None:
- self._downloader.trouble(u'WARNING: unable to extract uploader nickname')
+ # lookin for official user
+ mobj_official = re.search(r'<span rel="author"[^>]+?>([^<]+?)</span>', webpage)
+ if mobj_official is None:
+ self._downloader.trouble(u'WARNING: unable to extract uploader nickname')
+ else:
+ video_uploader = mobj_official.group(1)
else:
video_uploader = mobj.group(1)