1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

dplay: fix url for .no and .dk

fixes: #823
This commit is contained in:
Johan Andersson 2018-02-26 00:34:58 +01:00
parent 706e8921d0
commit 61ff824fd6

View File

@ -38,7 +38,8 @@ class Dplay(Service):
channel = True channel = True
self.options.live = True self.options.live = True
else: else:
url = "https://disco-api.{}/content{}".format(self.domain, parse.path) match = re.search("(videos|videoer)/(.*)$", parse.path)
url = "https://disco-api.{}/content/videos/{}".format(self.domain, match.group(2))
res = self.http.get(url, headers={"x-disco-client": "WEB:UNKNOWN:dplay-client:0.0.1"}) res = self.http.get(url, headers={"x-disco-client": "WEB:UNKNOWN:dplay-client:0.0.1"})
janson = res.json() janson = res.json()
if "errors" in janson: if "errors" in janson:
@ -93,7 +94,7 @@ class Dplay(Service):
parse = urlparse(self.url) parse = urlparse(self.url)
self.domain = re.search(r"(dplay\.\w\w)", parse.netloc).group(1) self.domain = re.search(r"(dplay\.\w\w)", parse.netloc).group(1)
match = re.search("^/(program|videos)/([^/]+)", parse.path) match = re.search("^/(program|programmer|videos|videoer)/([^/]+)", parse.path)
if not match: if not match:
log.error("Can't find show name") log.error("Can't find show name")
return None return None