1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-29 06:34:19 +01:00
svtplay-dl/lib/svtplay/service/urplay.py
2013-02-12 19:43:37 +01:00

18 lines
502 B
Python

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
def get(self, options, url):
data = get_http_data(url)
match = re.search('file=(.*)\&plugins', data)
if match:
path = "mp%s:%s" % (match.group(1)[-1], match.group(1))
options.other = "-a ondemand -y %s" % path
download_rtmp(options, "rtmp://streaming.ur.se/")