mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hls: handle cookies
This commit is contained in:
parent
0d5a05be64
commit
c6d9a5732d
@ -60,7 +60,8 @@ class HLS(VideoRetriever):
|
|||||||
if self.options.live and not self.options.force:
|
if self.options.live and not self.options.force:
|
||||||
raise LiveHLSException(self.url)
|
raise LiveHLSException(self.url)
|
||||||
|
|
||||||
m3u8 = self.http.request("get", self.url).text
|
cookies = self.kwargs["cookies"]
|
||||||
|
m3u8 = self.http.request("get", self.url, cookies=cookies).text
|
||||||
globaldata, files = parsem3u(m3u8)
|
globaldata, files = parsem3u(m3u8)
|
||||||
encrypted = False
|
encrypted = False
|
||||||
key = None
|
key = None
|
||||||
@ -94,7 +95,7 @@ class HLS(VideoRetriever):
|
|||||||
progressbar(len(files), n, ''.join(['ETA: ', str(eta)]))
|
progressbar(len(files), n, ''.join(['ETA: ', str(eta)]))
|
||||||
n += 1
|
n += 1
|
||||||
|
|
||||||
data = self.http.request("get", item)
|
data = self.http.request("get", item, cookies=cookies)
|
||||||
if data.status_code == 404:
|
if data.status_code == 404:
|
||||||
break
|
break
|
||||||
data = data.content
|
data = data.content
|
||||||
|
Loading…
Reference in New Issue
Block a user