[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.
This commit is contained in:
Philipp Hagemeister 2014-08-22 18:40:26 +02:00
parent ed2d6a1960
commit 2b9faf5542
3 changed files with 113 additions and 47 deletions

View file

@ -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]