From: Philipp Hagemeister Date: Fri, 16 May 2014 11:21:24 +0000 (+0200) Subject: [youtube] Look for published-on date if uploaded-on is not found X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=beee53de06eca52d0ae042ce6fcabf319180ec14;p=youtube-dl [youtube] Look for published-on date if uploaded-on is not found Fixes #2911 --- diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 6dcdc866b..f0d1f6400 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1138,6 +1138,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): # upload date upload_date = None mobj = re.search(r'(?s)id="eow-date.*?>(.*?)', video_webpage) + if mobj is None: + mobj = re.search( + r'(?s)id="watch-uploader-info".*?>.*?Published on (.*?)', + video_webpage) if mobj is not None: upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split()) upload_date = unified_strdate(upload_date)