문제

The issue is getting call to recognize the o.geturl() command in the call command.

from subprocess import call
import time
from urlparse import urlparse

def ListOfTests():
    myFile = open("testUrlToImport.txt", "r")
    myLines = list(myFile)
    myFile.close()

    for urls in myLines:
        urlsAsAString = str(urls)
        o =urlparse(urlsAsAString)

        call(["phantomjs", "yslow.js", "--info", "basic", "--format", "plain", "o.geturl()"])

Any pointers are appreciated. Thanks!

도움이 되었습니까?

해결책

You should remove quotes from the o.geturl(). This should work:

call(["phantomjs", "yslow.js", "--info", "basic", "--format", "plain", o.geturl()])
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top