mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 13:44:14 +01:00
Updated the API URL to work for NO and DK. It's testet to work.
This commit is contained in:
parent
dae39fae24
commit
80a8094661
@ -132,7 +132,12 @@ class Dplay(Service):
|
|||||||
logging.error("Something went wrong getting token for requests")
|
logging.error("Something went wrong getting token for requests")
|
||||||
|
|
||||||
premium = self._checkpremium()
|
premium = self._checkpremium()
|
||||||
url = "http://disco-api.{}/cms/routes/program/{}?decorators=viewingHistory&include=default".format(self.domain, match.group(2))
|
|
||||||
|
urllocal=''
|
||||||
|
if self.domain in ['dplay.dk', 'dplay.no']:
|
||||||
|
urllocal = 'mer'
|
||||||
|
|
||||||
|
url = "http://disco-api.{}/cms/routes/program{}/{}?decorators=viewingHistory&include=default".format(self.domain, urllocal,match.group(2))
|
||||||
res = self.http.get(url)
|
res = self.http.get(url)
|
||||||
for what in res.json()["included"]:
|
for what in res.json()["included"]:
|
||||||
if "attributes" in what and "alias" in what["attributes"] and "season" in what["attributes"]["alias"]:
|
if "attributes" in what and "alias" in what["attributes"] and "season" in what["attributes"]["alias"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user