Explorar el Código

[fix] link attrib

asciimoo hace 11 años
padre
commit
15a2c27864
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      searx/engines/deviantart.py

+ 1
- 1
searx/engines/deviantart.py Ver fichero

@@ -24,6 +24,6 @@ def response(resp):
24 24
         url = urljoin(base_url, link.attrib.get('href'))
25 25
         title_links = result.xpath('.//span[@class="details"]//a[contains(@class, "t")]')
26 26
         title = ''.join(title_links[0].xpath('.//text()'))
27
-        content = html.tostring(link)+'<br />'+link.attrib.get('title')
27
+        content = html.tostring(link)+'<br />'+link.attrib.get('title', '')
28 28
         results.append({'url': url, 'title': title, 'content': content})
29 29
     return results