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

21 lines
643 B
Python
Raw Normal View History

2015-07-05 21:08:11 +02:00
import re
from svtplay_dl.error import ServiceError
2019-08-25 00:40:39 +02:00
from svtplay_dl.fetcher.hls import hlsparse
from svtplay_dl.service import OpenGraphThumbMixin
from svtplay_dl.service import Service
2015-07-05 21:08:11 +02:00
class Efn(Service, OpenGraphThumbMixin):
supported_domains_re = ["www.efn.se"]
def get(self):
match = re.search('data-hls="([^"]+)"', self.get_urldata())
2015-07-05 21:08:11 +02:00
if not match:
yield ServiceError("Cant find video info")
2015-07-05 21:08:11 +02:00
return
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]