2015-07-05 21:08:11 +02:00
|
|
|
from __future__ import absolute_import
|
|
|
|
import re
|
|
|
|
|
|
|
|
from svtplay_dl.service import Service, OpenGraphThumbMixin
|
2015-10-04 14:37:16 +02:00
|
|
|
from svtplay_dl.fetcher.hls import hlsparse
|
2015-09-06 14:19:10 +02:00
|
|
|
from svtplay_dl.error import ServiceError
|
2015-07-05 21:08:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Efn(Service, OpenGraphThumbMixin):
|
|
|
|
supported_domains_re = ["www.efn.se"]
|
|
|
|
|
2015-12-26 11:46:14 +01:00
|
|
|
def get(self):
|
2015-08-30 00:06:20 +02:00
|
|
|
match = re.search('data-hls="([^"]+)"', self.get_urldata())
|
2015-07-05 21:08:11 +02:00
|
|
|
if not match:
|
2015-09-06 14:19:10 +02:00
|
|
|
yield ServiceError("Cant find video info")
|
2015-07-05 21:08:11 +02:00
|
|
|
return
|
|
|
|
|
2018-05-21 00:56:22 +02:00
|
|
|
streams = hlsparse(self.config, self.http.request("get", match.group(1)), match.group(1), output=self.output)
|
2018-05-08 22:48:55 +02:00
|
|
|
for n in list(streams.keys()):
|
|
|
|
yield streams[n]
|