diff options
author | Tailszefox <tails@tailszefox.no-ip.com> | 2012-10-03 10:57:46 +0200 |
---|---|---|
committer | Tailszefox <tails@tailszefox.no-ip.com> | 2012-10-03 10:57:46 +0200 |
commit | 413575f7a5c00195b80640e09d30a424b9c18b50 (patch) | |
tree | b079a6d01be5751187b47a82748d33c658dae043 /youtube_dl/InfoExtractors.py | |
parent | b7b4796bf263295616aa1f7c8d3b8e4104601838 (diff) |
Added uploaded date for Dailymotion
Diffstat (limited to 'youtube_dl/InfoExtractors.py')
-rw-r--r-- | youtube_dl/InfoExtractors.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 8d428b25d..9e5ea7c61 100644 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -683,11 +683,16 @@ class DailymotionIE(InfoExtractor): return video_uploader = mobj.group(1) + video_upload_date = u'NA' + mobj = re.search(r'<div class="[^"]*uploaded_cont[^"]*" title="[^"]*">([0-9]{2})-([0-9]{2})-([0-9]{4})</div>', webpage) + if mobj is not None: + video_upload_date = mobj.group(3) + mobj.group(2) + mobj.group(1) + return [{ 'id': video_id.decode('utf-8'), 'url': video_url.decode('utf-8'), 'uploader': video_uploader.decode('utf-8'), - 'upload_date': u'NA', + 'upload_date': video_upload_date, 'title': video_title, 'ext': video_extension.decode('utf-8'), 'format': u'NA', |