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

Add minimal set of imports for services to work

This commit is contained in:
Olof Johansson 2013-02-12 19:43:37 +01:00
parent b2635fd52a
commit c08155a074
15 changed files with 127 additions and 2 deletions

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)