1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

filmarkivet: adding support for the site

fixes: #423
This commit is contained in:
Johan Andersson 2016-08-17 19:53:56 +02:00
parent 4374d1c38d
commit 1ed9e2aaf2
2 changed files with 26 additions and 0 deletions

View File

@ -27,6 +27,7 @@ from svtplay_dl.service.dr import Dr
from svtplay_dl.service.efn import Efn
from svtplay_dl.service.expressen import Expressen
from svtplay_dl.service.facebook import Facebook
from svtplay_dl.service.filmarkivet import Filmarkivet
from svtplay_dl.service.hbo import Hbo
from svtplay_dl.service.twitch import Twitch
from svtplay_dl.service.lemonwhale import Lemonwhale
@ -62,6 +63,7 @@ sites = [
Efn,
Expressen,
Facebook,
Filmarkivet,
Hbo,
Twitch,
Lemonwhale,

View File

@ -0,0 +1,24 @@
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
from __future__ import absolute_import
import re
import copy
from svtplay_dl.service import Service, OpenGraphThumbMixin
from svtplay_dl.error import ServiceError
from svtplay_dl.fetcher.http import HTTP
class Filmarkivet(Service, OpenGraphThumbMixin):
supported_domains = ["filmarkivet.se"]
def get(self):
if self.exclude():
yield ServiceError("Excluding video")
return
match = re.search(r'[^/]file: "(http[^"]+)', self.get_urldata())
if not match:
yield ServiceError("Can't find the video file")
return
yield HTTP(copy.copy(self.options), match.group(1), 480)