aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-05-16 13:21:24 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-05-16 13:21:44 +0200
commitbeee53de06eca52d0ae042ce6fcabf319180ec14 (patch)
tree4bfa633457f55d548ad8306251018a3a72808429 /youtube_dl/extractor/youtube.py
parent8712f2bea7b70307f7858d50f317534494067757 (diff)
[youtube] Look for published-on date if uploaded-on is not found
Fixes #2911
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py4
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)