mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hls: if the file start with / add hostname to it.
This commit is contained in:
parent
7c8cf96900
commit
bdf7a181ea
@ -27,6 +27,9 @@ class LiveHLSException(HLSException):
|
||||
def _get_full_url(url, srcurl):
|
||||
if url[:4] == 'http':
|
||||
return url
|
||||
if url[0] == '/':
|
||||
baseurl = re.search(r'^(http[s]{0,1}://[^/]+)/', srcurl)
|
||||
return "%s%s" % (baseurl.group(1), url)
|
||||
|
||||
# remove everything after last / in the path of the URL
|
||||
baseurl = re.sub(r'^([^\?]+)/[^/]*(\?.*)?$', r'\1', srcurl)
|
||||
|
Loading…
Reference in New Issue
Block a user