aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-02-09 18:09:57 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-02-09 18:09:57 +0100
commit026fcc04956f2077a50cd4b4e9b87f45d2bcddea (patch)
treec8793f94bd3ecbe1f3af8192f2f451ee167465b8 /youtube_dl
parent81c2f20b5386d89a62dc27293654d75b77f47473 (diff)
Fix #2355 (date parsing with dashes)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index fa8f80e02..67c6af507 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -756,9 +756,9 @@ def unified_strdate(date_str):
"""Return a string with the date in the format YYYYMMDD"""
upload_date = None
#Replace commas
- date_str = date_str.replace(',',' ')
+ date_str = date_str.replace(',', ' ')
# %z (UTC offset) is only supported in python>=3.2
- date_str = re.sub(r' ?(\+|-)[0-9:]*$', '', date_str)
+ date_str = re.sub(r' ?(\+|-)[0-9]{2}:?[0-9]{2}$', '', date_str)
format_expressions = [
'%d %B %Y',
'%B %d %Y',