mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
HDS: handle 403 error when the playlist is geoblocked
This commit is contained in:
parent
b9bbedc2e7
commit
2eef43843d
@ -13,6 +13,7 @@ from svtplay_dl.utils import is_py2_old, is_py2, is_py3
|
||||
from svtplay_dl.utils.urllib import urlparse
|
||||
from svtplay_dl.error import UIException
|
||||
from svtplay_dl.fetcher import VideoRetriever
|
||||
from svtplay_dl.error import ServiceError
|
||||
|
||||
log = logging.getLogger('svtplay_dl')
|
||||
|
||||
@ -44,6 +45,9 @@ class LiveHDSException(HDSException):
|
||||
def hdsparse(options, res, manifest):
|
||||
streams = {}
|
||||
bootstrap = {}
|
||||
if res.status_code == 403:
|
||||
streams[0] = ServiceError("Can't read HDS playlist. permission denied")
|
||||
return streams
|
||||
xml = ET.XML(res.text)
|
||||
|
||||
if is_py2_old:
|
||||
|
Loading…
Reference in New Issue
Block a user