[fix] indexing

This commit is contained in:
Adam Tauber 2014-03-21 18:17:13 +01:00
parent 01c2eeb8ff
commit a8a0de644d

View File

@ -23,7 +23,10 @@ def response(resp):
doc = fromstring(resp.text)
for r in doc.xpath(result_xpath):
res_url = r.xpath(url_xpath)[-1]
try:
res_url = r.xpath(url_xpath)[-1]
except:
continue
if not res_url:
continue
title = html_to_text(''.join(r.xpath(title_xpath)))