1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-12-23 06:57:54 +01:00

[vimeo] Fix upload date extraction

This commit is contained in:
Jaime Marquínez Ferrándiz 2015-03-06 18:16:56 +01:00
parent f207019ce5
commit 3c6f245083

View File

@ -20,6 +20,7 @@ from ..utils import (
RegexNotFoundError, RegexNotFoundError,
smuggle_url, smuggle_url,
std_headers, std_headers,
unified_strdate,
unsmuggle_url, unsmuggle_url,
urlencode_postdata, urlencode_postdata,
) )
@ -140,6 +141,7 @@ class VimeoIE(VimeoBaseInfoExtractor):
'description': 'md5:8678b246399b070816b12313e8b4eb5c', 'description': 'md5:8678b246399b070816b12313e8b4eb5c',
'uploader_id': 'atencio', 'uploader_id': 'atencio',
'uploader': 'Peter Atencio', 'uploader': 'Peter Atencio',
'upload_date': '20130927',
'duration': 187, 'duration': 187,
}, },
}, },
@ -323,9 +325,9 @@ class VimeoIE(VimeoBaseInfoExtractor):
# Extract upload date # Extract upload date
video_upload_date = None video_upload_date = None
mobj = re.search(r'<meta itemprop="dateCreated" content="(\d{4})-(\d{2})-(\d{2})T', webpage) mobj = re.search(r'<time[^>]+datetime="([^"]+)"', webpage)
if mobj is not None: if mobj is not None:
video_upload_date = mobj.group(1) + mobj.group(2) + mobj.group(3) video_upload_date = unified_strdate(mobj.group(1))
try: try:
view_count = int(self._search_regex(r'UserPlays:(\d+)', webpage, 'view count')) view_count = int(self._search_regex(r'UserPlays:(\d+)', webpage, 'view count'))