projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8712f2b
)
[youtube] Look for published-on date if uploaded-on is not found
author
Philipp Hagemeister
<phihag@phihag.de>
Fri, 16 May 2014 11:21:24 +0000
(13:21 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Fri, 16 May 2014 11:21:44 +0000
(13:21 +0200)
Fixes #2911
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 6dcdc866beb61d183ed3234f1659aa0c3c2635d1..f0d1f6400cb1514b205022a2b89d8e568d263c53 100644
(file)
--- 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)