From 93a3a5fadab3f8accb475a80aa8f32dad6c8b92a Mon Sep 17 00:00:00 2001 From: Christopher Rosell Date: Wed, 26 Oct 2011 03:03:19 +0200 Subject: Add SWF verification. --- src/livestreamer/plugins/justintv.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/livestreamer/plugins/justintv.py') 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) -- cgit v1.2.3