[youtube] Look for published-on date if uploaded-on is not found
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 16 May 2014 11:21:24 +0000 (13:21 +0200)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 16 May 2014 11:21:44 +0000 (13:21 +0200)
Fixes #2911

youtube_dl/extractor/youtube.py

index 6dcdc866beb61d183ed3234f1659aa0c3c2635d1..f0d1f6400cb1514b205022a2b89d8e568d263c53 100644 (file)
@@ -1138,6 +1138,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
         # upload date
         upload_date = None
         mobj = re.search(r'(?s)id="eow-date.*?>(.*?)</span>', video_webpage)
+        if mobj is None:
+            mobj = re.search(
+                r'(?s)id="watch-uploader-info".*?>.*?Published on (.*?)</strong>',
+                video_webpage)
         if mobj is not None:
             upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
             upload_date = unified_strdate(upload_date)