mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-30 15:14:14 +01:00
parent
1e72958dc4
commit
0596ee743b
@ -1,6 +1,8 @@
|
||||
from __future__ import absolute_import
|
||||
import re
|
||||
import copy
|
||||
from svtplay_dl.fetcher.hls import hlsparse
|
||||
from svtplay_dl.fetcher.http import HTTP
|
||||
|
||||
|
||||
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
||||
@ -8,10 +10,10 @@ from svtplay_dl.error import ServiceError
|
||||
|
||||
|
||||
class Riksdagen(Service, OpenGraphThumbMixin):
|
||||
supported_domains_re = ["www.riksdagen.se"]
|
||||
supported_domains_re = ["riksdagen.se", "www.riksdagen.se"]
|
||||
|
||||
def get(self):
|
||||
match = re.search("_([A-Z0-9]+)$", self.url)
|
||||
match = re.search("_([a-zA-Z0-9]+)$", self.url)
|
||||
if not match:
|
||||
yield ServiceError("Cant find video id.")
|
||||
return
|
||||
@ -32,3 +34,6 @@ class Riksdagen(Service, OpenGraphThumbMixin):
|
||||
streams = hlsparse(self.config, self.http.request("get", data2["url"]), data2["url"], output=self.output)
|
||||
for n in list(streams.keys()):
|
||||
yield streams[n]
|
||||
if i["mimetype"] == "video/mp4":
|
||||
for n in i["bandwidth"]:
|
||||
yield HTTP(copy.copy(self.config), n["url"], n["quality"], output=self.output)
|
||||
|
Loading…
Reference in New Issue
Block a user