1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-28 06:04:17 +01:00

svtplay: fix so -A work again

fixes #466
This commit is contained in:
Johan Andersson 2016-10-04 22:34:01 +02:00
parent fdd333f706
commit d0bca585e7

View File

@ -204,7 +204,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
def _genre(self, jansson): def _genre(self, jansson):
videos = [] videos = []
for i in jansson["context"]["dispatcher"]["stores"]["ClusterStore"]["clips"]: for i in jansson["clusterPage"]["content"]["clips"]:
videos.append(i["contentUrl"]) videos.append(i["contentUrl"])
return videos return videos
@ -221,7 +221,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
if match is None: if match is None:
videos = [] videos = []
match = re.search("_svtplay'] = ({.*});", self.get_urldata()) match = re.search("__reduxStore'] = ({.*});", self.get_urldata())
if match: if match:
dataj = json.loads(match.group(1)) dataj = json.loads(match.group(1))
else: else:
@ -232,7 +232,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
elif re.search("/genre", parse.path): elif re.search("/genre", parse.path):
videos = self._genre(dataj) videos = self._genre(dataj)
else: else:
items = dataj["context"]["dispatcher"]["stores"]["VideoTitlePageStore"]["data"]["relatedVideoTabs"] items = dataj["videoTitlePage"]["realatedVideoTabs"]
for i in items: for i in items:
if "sasong" in i["slug"]: if "sasong" in i["slug"]:
for n in i["videos"]: for n in i["videos"]: