diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-08-31 00:47:58 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-08-31 00:47:58 +0700 |
commit | 7998520933db70625ff3859c464fa4bbf2ff7fac (patch) | |
tree | 67538bf5cf3e9051e1d22be629ec209b6d76e848 /youtube_dl | |
parent | 5b4bfbfc3bba2174234834a08a97e261e492a2f0 (diff) |
[youtube] Fix upload date extraction (closes #14065)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 5a6b735a0..563cf6274 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1665,10 +1665,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): if not upload_date: upload_date = self._search_regex( [r'(?s)id="eow-date.*?>(.*?)</span>', - r'id="watch-uploader-info".*?>.*?(?:Published|Uploaded|Streamed live|Started) on (.+?)</strong>'], + r'(?:id="watch-uploader-info".*?>.*?|["\']simpleText["\']\s*:\s*["\'])(?:Published|Uploaded|Streamed live|Started) on (.+?)[<"\']'], video_webpage, 'upload date', default=None) - if upload_date: - upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split()) upload_date = unified_strdate(upload_date) video_license = self._html_search_regex( |