diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2011-10-26 03:03:19 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2011-10-26 03:03:19 +0200 |
commit | 93a3a5fadab3f8accb475a80aa8f32dad6c8b92a (patch) | |
tree | 0c14a9884f08cdffea26eaeb21f5fd39ebb2f951 /src/livestreamer/plugins | |
parent | 90f501e1d22f26a84e9fbd0f08b962a5c495f7af (diff) |
Add SWF verification.
Diffstat (limited to 'src/livestreamer/plugins')
-rw-r--r-- | src/livestreamer/plugins/justintv.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/livestreamer/plugins/justintv.py b/src/livestreamer/plugins/justintv.py index e9631a1..dacfd05 100644 --- a/src/livestreamer/plugins/justintv.py +++ b/src/livestreamer/plugins/justintv.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 from livestreamer.plugins import Plugin, register_plugin -from livestreamer.utils import CommandLine +from livestreamer.utils import CommandLine, swfverify from livestreamer.compat import urllib, str import xml.dom.minidom, re, sys, random @@ -66,9 +66,13 @@ class JustinTV(object): return streams def stream_cmdline(self, stream, filename): + swfhash, swfsize = swfverify(self.SWFURL) + cmd = CommandLine("rtmpdump") cmd.arg("rtmp", ("{0}/{1}").format(stream["connect"], stream["play"])) cmd.arg("swfUrl", self.SWFURL) + cmd.arg("swfhash", swfhash) + cmd.arg("swfsize", swfsize) cmd.arg("live", True) cmd.arg("flv", filename) |