Don't use report_warning for reporting warnings
[youtube-dl] / youtube_dl / utils.py
index 2615553c11117c0e24975b4583602a9595893beb..d7ae5a90a8480f6c825303039b357ff53e7f8d56 100644 (file)
@@ -894,6 +894,7 @@ def unified_strdate(date_str):
         '%Y/%m/%d %H:%M:%S',
         '%d/%m/%Y %H:%M:%S',
         '%Y-%m-%d %H:%M:%S',
+        '%Y-%m-%d %H:%M:%S.%f',
         '%d.%m.%Y %H:%M',
         '%d.%m.%Y %H.%M',
         '%Y-%m-%dT%H:%M:%SZ',
@@ -1576,9 +1577,9 @@ US_RATINGS = {
 
 def parse_age_limit(s):
     if s is None:
-        return 0
+        return None
     m = re.match(r'^(?P<age>\d{1,2})\+?$', s)
-    return int(m.group('age')) if m else US_RATINGS.get(s, 0)
+    return int(m.group('age')) if m else US_RATINGS.get(s, None)
 
 
 def strip_jsonp(code):