f.close()
return doc
-def download_rtmp(filename, vbase, vpath):
+def download_rtmp(filename, vbase, vpath, hash_url=None):
if vpath.endswith(".flv"):
vpath = vpath[:-4]
cmd = [
"-r", vbase,
"-y", vpath,
]
+ if hash_url is not None:
+ cmd += ["--swfVfy", hash_url]
try:
p = subprocess.Popen(cmd)
ret = p.wait()
vpath, ext = self.vpath.rsplit(".", 1)
vpath = ext + ":" + vpath
filename = self.title + "." + ext
- download_rtmp(filename, vbase, vpath)
+ download_rtmp(filename, vbase, vpath, HASH_URL)
def fill_nodes(root_node):