#encoding=utf8

import subprocess

def getDom(url):
    cmd = r'C:\Users\t-jizh\Downloads\phantomjs-2.1.1-windows\bin\phantomjs.exe constructionDom.js "%s"'%url
    print "cmd:", cmd
    stdout,stderr = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
    print stderr
    return stdout

targetUrl = 'www.yahoo.com'
getDom(targetUrl)
12bea740b097781785f3596883d243204220c7e3
#encoding=utf8

import subprocess

def getDom(url):
    cmd = r'C:\Users\t-jizh\Downloads\phantomjs-2.1.1-windows\bin\phantomjs.exe constructionDom.js "%s"'%url
    print "cmd:", cmd
    stdout,stderr = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()
    print stderr
    return stdout

targetUrl = 'www.yahoo.com'
getDom(targetUrl)