1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

svtplay: kanaler will work again

fixes: #1246
This commit is contained in:
Johan Andersson 2020-12-12 21:44:24 +01:00
parent 18a8758ee8
commit 82265dab50

View File

@ -41,13 +41,8 @@ class Svtplay(Service, MetadataThumbMixin):
urldata = self.get_urldata()
if parse.path[:8] == "/kanaler":
match = re.search('data-video-id="([\\w-]+)"', urldata)
if not match:
yield ServiceError("Can't find video info.")
return
_url = urljoin(URL_VIDEO_API, match.group(1))
ch = "ch-{}".format(parse.path[parse.path.rfind("/") + 1 :])
_url = urljoin(URL_VIDEO_API, ch)
res = self.http.get(_url)
try:
janson = res.json()