|
|
|
|
221
|
instant_answer = dom.xpath('//div[@id="_vBb"]//text()')
|
221
|
instant_answer = dom.xpath('//div[@id="_vBb"]//text()')
|
222
|
if instant_answer:
|
222
|
if instant_answer:
|
223
|
results.append({'answer': u' '.join(instant_answer)})
|
223
|
results.append({'answer': u' '.join(instant_answer)})
|
|
|
224
|
+ try:
|
|
|
225
|
+ results_num = int(dom.xpath('//div[@id="resultStats"]//text()')[0]
|
|
|
226
|
+ .split()[1].replace(',', ''))
|
|
|
227
|
+ results.append({'number_of_results': results_num})
|
|
|
228
|
+ except:
|
|
|
229
|
+ pass
|
224
|
|
230
|
|
225
|
# parse results
|
231
|
# parse results
|
226
|
for result in dom.xpath(results_xpath):
|
232
|
for result in dom.xpath(results_xpath):
|