mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-28 06:04:17 +01:00
svtplay: fix -A again after the svtplay move away from redux
This commit is contained in:
parent
4901d89cf6
commit
59456c799f
@ -192,7 +192,7 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
|||||||
return videos
|
return videos
|
||||||
|
|
||||||
res = self.http.get("http://www.svtplay.se/sista-chansen?sida=%s" % page)
|
res = self.http.get("http://www.svtplay.se/sista-chansen?sida=%s" % page)
|
||||||
match = re.search("__reduxStore'] = ({.*});", res.text)
|
match = re.search("__svtplay'] = ({.*});", res.text)
|
||||||
if not match:
|
if not match:
|
||||||
return videos
|
return videos
|
||||||
|
|
||||||
@ -224,27 +224,27 @@ class Svtplay(Service, OpenGraphThumbMixin):
|
|||||||
|
|
||||||
if match is None:
|
if match is None:
|
||||||
videos = []
|
videos = []
|
||||||
match = re.search("__reduxStore'] = ({.*});", self.get_urldata())
|
match = re.search("__svtplay'] = ({.*});", self.get_urldata())
|
||||||
if match:
|
|
||||||
dataj = json.loads(match.group(1))
|
|
||||||
else:
|
|
||||||
log.error("Couldn't retrieve episode list")
|
|
||||||
return
|
|
||||||
if re.search("sista-chansen", parse.path):
|
if re.search("sista-chansen", parse.path):
|
||||||
videos = self._last_chance(videos, 1)
|
videos = self._last_chance(videos, 1)
|
||||||
elif re.search("/genre", parse.path):
|
elif not match:
|
||||||
videos = self._genre(dataj)
|
log.error("Couldn't retrieve episode list")
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
items = dataj["videoTitlePage"]["realatedVideosTabs"]
|
dataj = json.loads(match.group(1))
|
||||||
for i in items:
|
if re.search("/genre", parse.path):
|
||||||
if "sasong" in i["slug"]:
|
videos = self._genre(dataj)
|
||||||
for n in i["videos"]:
|
else:
|
||||||
if n["url"] not in videos:
|
items = dataj["videoTitlePage"]["realatedVideosTabs"]
|
||||||
videos.append(n["url"])
|
for i in items:
|
||||||
if "senast" in i["slug"]:
|
if "sasong" in i["slug"]:
|
||||||
for n in i["videos"]:
|
for n in i["videos"]:
|
||||||
if n["url"] not in videos:
|
if n["url"] not in videos:
|
||||||
videos.append(n["url"])
|
videos.append(n["url"])
|
||||||
|
if "senast" in i["slug"]:
|
||||||
|
for n in i["videos"]:
|
||||||
|
if n["url"] not in videos:
|
||||||
|
videos.append(n["url"])
|
||||||
|
|
||||||
episodes = [urljoin("http://www.svtplay.se", x) for x in videos]
|
episodes = [urljoin("http://www.svtplay.se", x) for x in videos]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user