diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-09 00:21:57 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-09 00:21:57 +0600 |
commit | 4763b624a6655bc2333157031c73858f6b918f61 (patch) | |
tree | 512adfce9e92b7fb64d71032bad12f8568da422c /youtube_dl | |
parent | 6609b3ce371d08c0464a3caa30c21b61de221508 (diff) |
[xhamster] Fix upload date extraction
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/xhamster.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 97355d17f..560c38e26 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -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>[^<]+)", |