parsing - Parse POST HTTP response using Python -
i want parse post http response using python.
my response looks like:
{ "result": 0, "responsestatus": { "errorcode": null, "message": null, "stacktrace": null, "errors": null }, "sessionid": "68ebcd6f-0aef-420d-a12b-c953f8df8ed1", "responseheader": { "succeeded": true, "errors": [] } }
i want parse - "sessionid" 2nd http request. how can achieve it? !
import json response = '{"result": 0, "responsestatus": { "errorcode": null,"message": null, "stacktrace": null, "errors": null },"sessionid": "68ebcd6f-0aef-420d-a12b-c953f8df8ed1", "responseheader": { "succeeded": true, "errors": [] } }' json_response = json.loads(response) print json_response['sessionid']
i guess using urllib, recommend using requests
Comments
Post a Comment