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

svtplay: in some cases there is no season slug for videos

This commit is contained in:
Johan Andersson 2016-07-11 10:44:33 +02:00
parent 0ae031b8ac
commit dfcae7456e

View File

@ -165,6 +165,11 @@ class Svtplay(Service, OpenGraphThumbMixin):
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"]:
if n["url"] not in videos:
videos.append(n["url"])
if "senast" in i["slug"]:
for n in i["videos"]:
if n["url"] not in videos:
videos.append(n["url"]) 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: