mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
Update the sr.se part.
Now you can download the file if you link to the playlist.
This commit is contained in:
parent
b4ea7ef664
commit
816a53ad8b
23
svtplay-dl
23
svtplay-dl
@ -16,7 +16,7 @@ from optparse import OptionParser
|
||||
import xml.etree.ElementTree as ET
|
||||
import shlex
|
||||
|
||||
__version__ = "0.7.2012.04.07"
|
||||
__version__ = "0.7.2012.04.08"
|
||||
|
||||
class Common(object):
|
||||
logtosderr = False
|
||||
@ -34,11 +34,11 @@ class Common(object):
|
||||
response = urlopen(request)
|
||||
except HTTPError as e:
|
||||
self.to_console("Something wrong with that url")
|
||||
self.to_console("Error code:", e.code)
|
||||
self.to_console("Error code: %s" % e.code)
|
||||
sys.exit(5)
|
||||
except URLError as e:
|
||||
self.to_console("Something wrong with that url")
|
||||
self.to_console("Error code:", e.reason)
|
||||
self.to_console("Error code: %s" % e.reason)
|
||||
sys.exit(5)
|
||||
except ValueError as e:
|
||||
self.to_console("Try adding http:// before the url")
|
||||
@ -803,12 +803,17 @@ def main():
|
||||
|
||||
elif re.findall("sverigesradio", url):
|
||||
data = common.getdata(url)
|
||||
match = re.search("linkUrl=(.*)\;isButton=", data)
|
||||
if not match:
|
||||
common.to_console("Cant find video file")
|
||||
sys.exit(2)
|
||||
|
||||
sr = Sr(common, output, quality, live, unquote_plus(match.group(1)), resume)
|
||||
parse = urlparse(url)
|
||||
try:
|
||||
metafile = parse_qs(parse[4])["metafile"][0]
|
||||
other = "%s?%s" % (parse[2], parse[4])
|
||||
except KeyError:
|
||||
match = re.search("linkUrl=(.*)\;isButton=", data)
|
||||
if not match:
|
||||
common.to_console("Cant find video file")
|
||||
sys.exit(2)
|
||||
other = unquote_plus(match.group(1))
|
||||
sr = Sr(common, output, quality, live, other, resume)
|
||||
sr.get("http://sverigesradio.se")
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user