41def response(resp):
42 results = []
43
44 dom = html.fromstring(resp.text)
45
46 for result in eval_xpath_list(dom, results_xpath):
47 thumbnail_src = extract_text(eval_xpath(result, thumbnail_xpath))
48 img_src = thumbnail_src.replace("b.", ".")
49
50
51
52 if len(thumbnail_src) < 25:
53 continue
54
55 results.append(
56 {
57 'template': 'images.html',
58 'url': base_url + extract_text(eval_xpath(result, url_xpath)),
59 'title': extract_text(eval_xpath(result, title_xpath)),
60 'img_src': img_src,
61 'thumbnail_src': thumbnail_src,
62 }
63 )
64
65 return results