mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
viaplay: support for downloading lastest X episodes
This commit is contained in:
parent
86a638b029
commit
fe39ba2a82
@ -121,4 +121,11 @@ class Viaplay(Service, OpenGraphThumbMixin):
|
||||
jsondata = json.loads(data)
|
||||
videos = jsondata["_embedded"]["sections"][1]["_embedded"]["seasons"][0]["_embedded"]["episodelist"]["_embedded"]["videos"]
|
||||
|
||||
return sorted(x["sharing"]["url"] for x in videos)
|
||||
n=0
|
||||
episodes = []
|
||||
for i in videos:
|
||||
if n == options.all_last:
|
||||
break
|
||||
episodes.append(i["sharing"]["url"])
|
||||
n += 1
|
||||
return episodes
|
||||
|
Loading…
Reference in New Issue
Block a user