import json
out = check_output(['./phantomjs', '--ssl-protocol=any',
    '--web-security=false', 'getResources.js', your_url])
data = json.loads(out)
How to list loaded resources with Selenium/PhantomJS?