]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[youtube] Fix upload date extraction (closes #14065)
authorSergey M․ <dstftw@gmail.com>
Wed, 30 Aug 2017 17:47:58 +0000 (00:47 +0700)
committerSergey M․ <dstftw@gmail.com>
Wed, 30 Aug 2017 17:47:58 +0000 (00:47 +0700)
youtube_dl/extractor/youtube.py

index 5a6b735a09b87b839f01af91db40514170066604..563cf62748ec90d771152241583ade6cd6531246 100644 (file)
@@ -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(