print(r.text) # if not found r.text=="" dic=dict() index=r.text.index("retailersaleskey") data_ls=r.text[index:].split(',') for data in data_ls: key=data.split("=")[0].strip() value=data.split("=")[1].strip().replace("\"","") dic[key]=value retailersalesObj=json.loads(json.dumps(dic),object_hook=JSONObject) print(retailersalesObj.retailersaleskey) print(retailersalesObj.RetailerTransID)