This website works better with JavaScript.
Home
Help
Sign In
zolfa
/
youtube-dl
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
1.1k
Wiki
Activity
Browse Source
[utils] Add strip_or_none
totalwebcasting
Sergey M․
8 years ago
parent
46f59e89ea
commit
b72b44318c
No known key found for this signature in database
GPG Key ID:
2C393E0F18A9236D
1 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-0
youtube_dl/utils.py
+ 4
- 0
youtube_dl/utils.py
View File
@ -1660,6 +1660,10 @@ def float_or_none(v, scale=1, invscale=1, default=None):
return
default
def
strip_or_none
(
v
)
:
return
None
if
v
is
None
else
v
.
strip
(
)
def
parse_duration
(
s
)
:
if
not
isinstance
(
s
,
compat_basestring
)
:
return
None
Write
Preview
Loading…
Cancel
Save