mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
öppetarkiv: no need to check if streams are empty or not
This commit is contained in:
parent
512f8a0979
commit
00814e690d
@ -50,22 +50,19 @@ class OppetArkiv(Service, OpenGraphThumbMixin):
|
||||
parse = urlparse(i["url"])
|
||||
query = parse_qs(parse.query)
|
||||
if i["format"] == "hls" or i["format"] == "ios":
|
||||
if streams:
|
||||
streams = hlsparse(self.config, self.http.request("get", i["url"]), i["url"], output=self.output)
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
streams = hlsparse(self.config, self.http.request("get", i["url"]), i["url"], output=self.output)
|
||||
if "alt" in query and len(query["alt"]) > 0:
|
||||
alt = self.http.get(query["alt"][0])
|
||||
if alt:
|
||||
streams = hlsparse(self.config, self.http.request("get", alt.request.url), alt.request.url, output=self.output)
|
||||
if streams:
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
if i["format"] == "hds" or i["format"] == "flash":
|
||||
match = re.search(r"\/se\/secure\/", i["url"])
|
||||
if not match:
|
||||
streams = hdsparse(self.config, self.http.request("get", i["url"], params={"hdcore": "3.7.0"}), i["url"], output=self.output)
|
||||
if streams:
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
if "alt" in query and len(query["alt"]) > 0:
|
||||
@ -74,12 +71,10 @@ class OppetArkiv(Service, OpenGraphThumbMixin):
|
||||
streams = hdsparse(self.config,
|
||||
self.http.request("get", alt.request.url, params={"hdcore": "3.7.0"}),
|
||||
alt.request.url, output=self.output)
|
||||
if streams:
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
if i["format"] == "dash264" or i["format"] == "dashhbbtv":
|
||||
streams = dashparse(self.config, self.http.request("get", i["url"]), i["url"])
|
||||
if streams:
|
||||
streams = dashparse(self.config, self.http.request("get", i["url"]), i["url"], output=self.output)
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
|
||||
@ -87,7 +82,6 @@ class OppetArkiv(Service, OpenGraphThumbMixin):
|
||||
alt = self.http.get(query["alt"][0])
|
||||
if alt:
|
||||
streams = dashparse(self.config, self.http.request("get", alt.request.url), alt.request.url, output=self.output)
|
||||
if streams:
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user