41 xmldom = etree.fromstring(resp.content)
42 xmlsearchresult = eval_xpath_getindex(xmldom,
'//data', 0)
43 dom = html.fragment_fromstring(xmlsearchresult.text, create_parent=
'div')
44 for link
in eval_xpath_list(dom,
'//a'):
45 url = urljoin(base_url, link.attrib.get(
'href'))
46 title = extract_text(link)
47 thumbnail_src = urljoin(
48 gallery_url, (eval_xpath_getindex(link,
'.//img', 0).attrib[
'src']).replace(base_url,
'')
55 'img_src': thumbnail_src,
57 'thumbnail_src': thumbnail_src,
58 'template':
'images.html',