From 82265dab502859c6e648fa7d7bbfd90dcc9b3d5e Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Sat, 12 Dec 2020 21:44:24 +0100 Subject: [PATCH] svtplay: kanaler will work again fixes: #1246 --- lib/svtplay_dl/service/svtplay.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index fe78dea..9c16c5c 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -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()