diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-05-16 13:21:24 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-05-16 13:21:44 +0200 |
commit | beee53de06eca52d0ae042ce6fcabf319180ec14 (patch) | |
tree | 4bfa633457f55d548ad8306251018a3a72808429 | |
parent | 8712f2bea7b70307f7858d50f317534494067757 (diff) |
[youtube] Look for published-on date if uploaded-on is not found
Fixes #2911
-rw-r--r-- | youtube_dl/extractor/youtube.py | 4 |
1 files changed, 4 insertions, 0 deletions
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.*?>(.*?)</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) |