diff --git a/lib/svtplay/service/aftonbladet.py b/lib/svtplay/service/aftonbladet.py index 9c46e8b..800be93 100644 --- a/lib/svtplay/service/aftonbladet.py +++ b/lib/svtplay/service/aftonbladet.py @@ -1,9 +1,16 @@ import sys import re -from urlparse import urlparse import xml.etree.ElementTree as ET from lib.svtplay.utils import get_http_data +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp +from lib.svtplay.http import download_http + +if sys.version_info > (3, 0): + from urllib.parse import urlparse, parse_qs +else: + from urlparse import urlparse, parse_qs class Aftonbladet(): def handle(self, url): diff --git a/lib/svtplay/service/dr.py b/lib/svtplay/service/dr.py index 58f5c76..54999cc 100644 --- a/lib/svtplay/service/dr.py +++ b/lib/svtplay/service/dr.py @@ -1,3 +1,9 @@ +import re +import json + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.rtmp import download_rtmp + class Dr(object): def handle(self, url): return "dr.dk" in url diff --git a/lib/svtplay/service/expressen.py b/lib/svtplay/service/expressen.py index 4f1642a..1a8b7e2 100644 --- a/lib/svtplay/service/expressen.py +++ b/lib/svtplay/service/expressen.py @@ -1,3 +1,17 @@ +import sys +import re +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + +if sys.version_info > (3, 0): + from urllib.parse import urlparse, parse_qs, unquote_plus, quote_plus +else: + from urlparse import urlparse, parse_qs + from urllib import unquote_plus, quote_plus + class Expressen(): def handle(self, url): return "expressen.se" in url diff --git a/lib/svtplay/service/hbo.py b/lib/svtplay/service/hbo.py index c8f6e36..1136d26 100644 --- a/lib/svtplay/service/hbo.py +++ b/lib/svtplay/service/hbo.py @@ -1,3 +1,12 @@ +import sys +import re +from urlparse import urlparse +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + class Hbo(): def handle(self, url): return "hbo.com" in url diff --git a/lib/svtplay/service/justin.py b/lib/svtplay/service/justin.py index fb112ec..3c4f1bf 100644 --- a/lib/svtplay/service/justin.py +++ b/lib/svtplay/service/justin.py @@ -1,3 +1,13 @@ +import sys +import re +from urlparse import urlparse +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp +from lib.svtplay.http import download_http + class Justin(): def handle(self, url): return ("twitch.tv" in url) or ("justin.tv" in url) diff --git a/lib/svtplay/service/kanal5.py b/lib/svtplay/service/kanal5.py index 11c8c4c..4778914 100644 --- a/lib/svtplay/service/kanal5.py +++ b/lib/svtplay/service/kanal5.py @@ -1,3 +1,11 @@ +import sys +import re +import json + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + class Kanal5(): def handle(self, url): return "kanal5play.se" in url diff --git a/lib/svtplay/service/kanal9.py b/lib/svtplay/service/kanal9.py index 9af11ad..29436c5 100644 --- a/lib/svtplay/service/kanal9.py +++ b/lib/svtplay/service/kanal9.py @@ -1,3 +1,10 @@ +import sys +import re + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + class Kanal9(): def handle(self, url): return ("kanal9play.se" in url) or ("kanal5.se" in url) diff --git a/lib/svtplay/service/nrk.py b/lib/svtplay/service/nrk.py index 2ae3cad..df17053 100644 --- a/lib/svtplay/service/nrk.py +++ b/lib/svtplay/service/nrk.py @@ -1,3 +1,9 @@ +import re + +from lib.svtplay.utils import get_http_data +from lib.svtplay.hds import download_hds +from lib.svtplay.hls import download_hls + class Nrk(object): def handle(self, url): return "nrk.no" in url diff --git a/lib/svtplay/service/qbrick.py b/lib/svtplay/service/qbrick.py index 95660e0..4fac366 100644 --- a/lib/svtplay/service/qbrick.py +++ b/lib/svtplay/service/qbrick.py @@ -1,3 +1,11 @@ +import sys +import re +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + class Qbrick(): def handle(self, url): return ("dn.se" in url) or ("di.se" in url) or ("svd.se" in url) diff --git a/lib/svtplay/service/ruv.py b/lib/svtplay/service/ruv.py index c355d4b..073d87a 100644 --- a/lib/svtplay/service/ruv.py +++ b/lib/svtplay/service/ruv.py @@ -1,3 +1,8 @@ +import re + +from lib.svtplay.utils import get_http_data +from svtplay.hls import download_hls + class Ruv(object): def handle(self, url): return "ruv.is" in url diff --git a/lib/svtplay/service/sr.py b/lib/svtplay/service/sr.py index c628c19..2d5d7eb 100644 --- a/lib/svtplay/service/sr.py +++ b/lib/svtplay/service/sr.py @@ -1,3 +1,17 @@ +import sys +import re +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data +from lib.svtplay.log import log +from lib.svtplay.http import download_http + +if sys.version_info > (3, 0): + from urllib.parse import urlparse, parse_qs, unquote_plus +else: + from urlparse import urlparse, parse_qs + from urllib import unquote_plus + class Sr(): def handle(self, url): return "sverigesradio.se" in url diff --git a/lib/svtplay/service/svtplay.py b/lib/svtplay/service/svtplay.py index 50d6240..f959a6c 100644 --- a/lib/svtplay/service/svtplay.py +++ b/lib/svtplay/service/svtplay.py @@ -3,9 +3,12 @@ import re import json from lib.svtplay.service import Service +from lib.svtplay.utils import get_http_data, select_quality + from lib.svtplay.hds import download_hds from lib.svtplay.hls import download_hls -from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.rtmp import download_rtmp +from lib.svtplay.http import download_http from lib.svtplay.log import log diff --git a/lib/svtplay/service/tv4play.py b/lib/svtplay/service/tv4play.py index 5fde2e6..ac32045 100644 --- a/lib/svtplay/service/tv4play.py +++ b/lib/svtplay/service/tv4play.py @@ -1,3 +1,17 @@ +import sys +import re +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data, select_quality +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp +from lib.svtplay.hds import download_hds + +if sys.version_info > (3, 0): + from urllib.parse import urlparse, parse_qs +else: + from urlparse import urlparse, parse_qs + class Tv4play(): def handle(self, url): return ("tv4play.se" in url) or ("tv4.se" in url) diff --git a/lib/svtplay/service/urplay.py b/lib/svtplay/service/urplay.py index 3f153af..cad7d2d 100644 --- a/lib/svtplay/service/urplay.py +++ b/lib/svtplay/service/urplay.py @@ -1,3 +1,8 @@ +import re + +from lib.svtplay.utils import get_http_data +from lib.svtplay.rtmp import download_rtmp + class Urplay(): def handle(self, url): return "urplay.se" in url diff --git a/lib/svtplay/service/viaplay.py b/lib/svtplay/service/viaplay.py index d108e77..f6fd44b 100644 --- a/lib/svtplay/service/viaplay.py +++ b/lib/svtplay/service/viaplay.py @@ -1,3 +1,12 @@ +import sys +import re +from urlparse import urlparse +import xml.etree.ElementTree as ET + +from lib.svtplay.utils import get_http_data +from lib.svtplay.log import log +from lib.svtplay.rtmp import download_rtmp + class Viaplay(): def handle(self, url): return ("tv3play.se" in url) or ("tv6play.se" in url) or ("tv8play.se" in url)