50 doc = fromstring(resp.text)
54 for r
in eval_xpath(doc,
'//div[@class="search_quickresult"]/ul/li'):
56 res_url = eval_xpath(r,
'.//a[@class="wikilink1"]/@href')[-1]
63 title = extract_text(eval_xpath(r,
'.//a[@class="wikilink1"]/@title'))
66 results.append({
'title': title,
'content':
"",
'url': base_url + res_url})
69 for r
in eval_xpath(doc,
'//dl[@class="search_results"]/*'):
72 res_url = eval_xpath(r,
'.//a[@class="wikilink1"]/@href')[-1]
73 title = extract_text(eval_xpath(r,
'.//a[@class="wikilink1"]/@title'))
75 content = extract_text(eval_xpath(r,
'.'))
78 results.append({
'title': title,
'content': content,
'url': base_url + res_url})