1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-12-24 02:15:55 +01:00

[xhamster] Fix upload date extraction

This commit is contained in:
Sergey M․ 2016-01-09 00:21:57 +06:00
parent 6609b3ce37
commit 4763b624a6

View File

@ -72,10 +72,9 @@ class XHamsterIE(InfoExtractor):
mobj = re.search(r'<span>Description: </span>([^<]+)', webpage)
description = mobj.group(1) if mobj else None
upload_date = self._html_search_regex(r'hint=\'(\d{4}-\d{2}-\d{2}) \d{2}:\d{2}:\d{2} [A-Z]{3,4}\'',
webpage, 'upload date', fatal=False)
if upload_date:
upload_date = unified_strdate(upload_date)
upload_date = unified_strdate(self._search_regex(
r'hint=["\'](\d{4}-\d{2}-\d{2}) \d{2}:\d{2}:\d{2} [A-Z]{3,4}',
webpage, 'upload date', fatal=False))
uploader = self._html_search_regex(
r"<a href='[^']+xhamster\.com/user/[^>]+>(?P<uploader>[^<]+)",