decoded = json.loads(html_body)
b=decoded['result']['dns_domain']['items'].keys()
html_body = '{"CardPAN":"1234567890123456789","EndDate":"01.01.2016","TicketTypeDesc":"00.04 CardName","CityName":"City","CardSum":99,"Time":"01.09.2016 11:11:01"}'
f = open(name, 'r')
text = f.read()
ev = html.document_fromstring(text)
item = {}
item['s']=[]
itemdata = ev.xpath('//li[@class="itr"]')
for evv in itemdata:
itm={}
itm['l'] = evv.xpath('./a[@class="js"]/@href')
itm['txt'] = evv.xpath('./a[@class="js"]/text()')
if itm:
item['s'].append(itm)
if item['s']:
coll.save(item)