import urllib
import lxml.etree as etree
def get_xml(url):
response = urllib.urlopen(url)
return response.read()
if __name__ == '__main__':
xml = get_xml('http://www.cbr.ru/scripts/XML_daily.asp?date_req=02/03/2002')
xml_data = etree.fromstring(xml)
bel_rub = xml_data.xpath("/ValCurs/Valute[@ID='R01090']/Value")[0].text
print(bel_rub)