projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef9f845
)
Fix date parsing for YouTube (patch by Drake Wyrm)
author
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Fri, 25 Feb 2011 18:05:35 +0000
(19:05 +0100)
committer
Ricardo Garcia
<sarbalap+freshmeat@gmail.com>
Fri, 25 Feb 2011 18:05:35 +0000
(19:05 +0100)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index 0dd872e507c9cdcced80d602fbc92ca47cf6191b..2e04c05b05934bc98da638d862f21340e40c3988 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-1059,7
+1059,7
@@
class YoutubeIE(InfoExtractor):
mobj = re.search(r'id="eow-date".*?>(.*?)</span>', video_webpage, re.DOTALL)
if mobj is not None:
upload_date = ' '.join(re.sub(r'[/,-]', r' ', mobj.group(1)).split())
- format_expressions = ['%d %B %Y', '%B %d %Y']
+ format_expressions = ['%d %B %Y', '%B %d %Y'
, '%b %d %Y'
]
for expression in format_expressions:
try:
upload_date = datetime.datetime.strptime(upload_date, expression).strftime('%Y%m%d')