diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2011-02-25 19:05:35 +0100 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2011-02-25 19:05:35 +0100 |
commit | 87cbd21323195cacb0febc7898a7fdc74ed97f9b (patch) | |
tree | 14071d15df476a727a8c04e5a7a9edabf539c769 | |
parent | ef9f8451c8c33308a277b4933d6b3fa728c1adc0 (diff) |
Fix date parsing for YouTube (patch by Drake Wyrm)
-rwxr-xr-x | youtube-dl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube-dl b/youtube-dl index 0dd872e50..2e04c05b0 100755 --- 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') |