import requests import json, xmljson from lxml.etree import fromstring, tostring import re url="http://rates.kazpost.kz/postratesws/postratesws.wsdl" #headers = {'content-type': 'application/soap+xml'} headers = {'content-type': 'text/xml'} body = """ 7 2 2 3500 13 3 """ response = requests.post(url,data=body,headers=headers) print(response.text) m = re.search(r'(\d+)', response.text) print(m.group(1))