Better way of testing the start of a string
This commit is contained in:
parent
d248196bb1
commit
53915bf6b5
2 changed files with 3 additions and 3 deletions
|
|
@ -115,11 +115,11 @@ class Videoob(ReplApplication):
|
|||
ext = 'avi'
|
||||
dest = '%s.%s' % (video.id, ext)
|
||||
|
||||
if video.url.find('rtmp') == 0:
|
||||
if video.url.startswith('rtmp'):
|
||||
if not check_exec('rtmpdump'):
|
||||
return 1
|
||||
args = ('rtmpdump', '-r', video.url, '-o', dest)
|
||||
elif video.url.find('mms') == 0:
|
||||
elif video.url.startswith('mms'):
|
||||
if not check_exec('mimms'):
|
||||
return 1
|
||||
args = ('mimms', video.url, dest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue