aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-08-22 18:40:26 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-08-22 18:40:28 +0200
commit2b9faf55427b73cb978ddd661c32a5cb313f9331 (patch)
tree03798e77b93eff75191db8740a36ffda21081034 /youtube_dl/utils.py
parented2d6a19607e965602d66ea90ac716118b739a16 (diff)
[rtve] Add support for live stream
At the moment, only RTVE-1 seems to work flawlessly. -2 seems geoblocked right now. -TDP doesn't seem to be available outside of Spain.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 42ad520f9..ac8a78adf 100644
--- 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]