@@ -80,14 +80,13 @@ def response(resp):
8080
8181 # parse results
8282 for result in dom.xpath('//div[@class="imgpt"]'):
83−
84− img_format = result.xpath('./div[contains(@class, "img_info")]/span/text()')[0]
85− # Microsoft seems to experiment with this code so don't make the path too specific,
86− # just catch the text section for the first anchor in img_info assuming this to be
87− # the originating site.
88− source = result.xpath('./div[contains(@class, "img_info")]//a/text()')[0]
89−
9083 try:
84+ img_format = result.xpath('./div[contains(@class, "img_info")]/span/text()')[0]
85+ # Microsoft seems to experiment with this code so don't make the path too specific,
86+ # just catch the text section for the first anchor in img_info assuming this to be
87+ # the originating site.
88+ source = result.xpath('./div[contains(@class, "img_info")]//a/text()')[0]
89+
9190 m = loads(result.xpath('./a/@m')[0])
9291
9392 # strip 'Unicode private use area' highlighting, they render to Tux