2
0
mirror of https://gitea.eponym.info/Mirrors/youtube-dl synced 2025-08-31 08:55:13 +00:00

[cnet] Add new extractor (Fixes #2679)

This commit is contained in:
Philipp Hagemeister
2014-04-03 16:21:21 +02:00
parent 968ed2a777
commit 9271bc8355
3 changed files with 75 additions and 4 deletions

View File

@@ -1176,12 +1176,12 @@ class HEADRequest(compat_urllib_request.Request):
return "HEAD"
def int_or_none(v, scale=1):
return v if v is None else (int(v) // scale)
def int_or_none(v, scale=1, default=None):
return default if v is None else (int(v) // scale)
def float_or_none(v, scale=1):
return v if v is None else (float(v) / scale)
def float_or_none(v, scale=1, default=None):
return default if v is None else (float(v) / scale)
def parse_duration(s):