From b156849495da231a27f8baddf8c99a648dee1a72 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 15 Sep 2016 08:53:49 +0200 Subject: [PATCH] svtplay: fix so sista-chansen work again fixes #451 --- lib/svtplay_dl/service/svtplay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/svtplay_dl/service/svtplay.py b/lib/svtplay_dl/service/svtplay.py index e432b45..8e95730 100644 --- a/lib/svtplay_dl/service/svtplay.py +++ b/lib/svtplay_dl/service/svtplay.py @@ -176,14 +176,14 @@ class Svtplay(Service, OpenGraphThumbMixin): return videos res = self.http.get("http://www.svtplay.se/sista-chansen?sida=%s" % page) - match = re.search("_svtplay'] = ({.*});", res.text) + match = re.search("__reduxStore'] = ({.*});", res.text) if not match: return videos dataj = json.loads(match.group(1)) - pages = dataj["context"]["dispatcher"]["stores"]["GridPageStore"]["totalPages"] + pages = dataj["gridPage"]["pagination"]["totalPages"] - for i in dataj["context"]["dispatcher"]["stores"]["GridPageStore"]["content"]: + for i in dataj["gridPage"]["content"]: videos.append(i["contentUrl"]) page += 1 self._last_chance(videos, page, pages)