projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[rtve] Add support for live stream
[youtube-dl]
/
youtube_dl
/
utils.py
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 42ad520f9cac27581aa4edbc3606a702f3376b82..ac8a78adfff20f5823d5235dbaee2474c6a9f0df 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-1285,6
+1285,12
@@
def remove_start(s, start):
return s
+def remove_end(s, end):
+ if s.endswith(end):
+ return s[:-len(end)]
+ return s
+
+
def url_basename(url):
path = compat_urlparse.urlparse(url).path
return path.strip(u'/').split(u'/')[-1]