1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-18 23:14:33 +01:00

[youtube] Look for published-on date if uploaded-on is not found

Fixes #2911
This commit is contained in:
Philipp Hagemeister 2014-05-16 13:21:24 +02:00
parent 8712f2bea7
commit beee53de06

View File

@ -1138,6 +1138,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
# upload date # upload date
upload_date = None upload_date = None
mobj = re.search(r'(?s)id="eow-date.*?>(.*?)</span>', video_webpage) 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: if mobj is not None:
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split()) upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
upload_date = unified_strdate(upload_date) upload_date = unified_strdate(upload_date)