2016-08-17 19:53:56 +02:00
|
|
|
# ex:ts=4:sw=4:sts=4:et
|
|
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
import copy
|
2019-08-25 00:40:39 +02:00
|
|
|
import re
|
2016-08-17 19:53:56 +02:00
|
|
|
|
|
|
|
from svtplay_dl.error import ServiceError
|
|
|
|
from svtplay_dl.fetcher.http import HTTP
|
2019-08-25 00:40:39 +02:00
|
|
|
from svtplay_dl.service import OpenGraphThumbMixin
|
|
|
|
from svtplay_dl.service import Service
|
2016-08-17 19:53:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Filmarkivet(Service, OpenGraphThumbMixin):
|
|
|
|
supported_domains = ["filmarkivet.se"]
|
|
|
|
|
|
|
|
def get(self):
|
|
|
|
match = re.search(r'[^/]file: "(http[^"]+)', self.get_urldata())
|
|
|
|
if not match:
|
|
|
|
yield ServiceError("Can't find the video file")
|
|
|
|
return
|
2018-05-21 00:56:22 +02:00
|
|
|
yield HTTP(copy.copy(self.config), match.group(1), 480, output=self.output)
|