diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-10-03 20:17:10 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-10-03 20:17:12 +0200 |
commit | d838b1bd4a256484820af7aeb0c2711934cb00ad (patch) | |
tree | 94680fb9f3c35d0faeb88a143fc42894cbd1a896 /youtube_dl/utils.py | |
parent | fe506288bd327d3e7e9a90706ba10f3ff3d36ffe (diff) |
[utils] Default age_limit to None
If we can't parse it, it means we don't have any information, not that the content is unrestricted.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 2615553c1..2c9081733 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1576,9 +1576,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): |