summaryrefslogtreecommitdiff
path: root/searx/engines/yahoo.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-12-07 17:49:01 +0100
committerAdam Tauber <asciimoo@gmail.com>2014-12-07 17:49:01 +0100
commit9517f7a6e775aded6f1673f4a991594b08750467 (patch)
tree332019feae5a215d2d54528308792560794d7aa5 /searx/engines/yahoo.py
parent611f4e2a86a84b3d15bdaf6ef7435549ea86fcfa (diff)
parent7c13d630e4531630ce3c392a7d60752715742291 (diff)
Merge pull request #139 from dalf/master
pep8 : engines
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r--searx/engines/yahoo.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index 5e34a2b07..938540ece 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -1,8 +1,9 @@
## Yahoo (Web)
-#
+#
# @website https://search.yahoo.com/web
-# @provide-api yes (https://developer.yahoo.com/boss/search/), $0.80/1000 queries
-#
+# @provide-api yes (https://developer.yahoo.com/boss/search/),
+# $0.80/1000 queries
+#
# @using-api no (because pricing)
# @results HTML (using search portal)
# @stable no (HTML can change)
@@ -40,8 +41,8 @@ def parse_url(url_string):
if endpos > -1:
endpositions.append(endpos)
- if start==0 or len(endpositions) == 0:
- return url_string
+ if start == 0 or len(endpositions) == 0:
+ return url_string
else:
end = min(endpositions)
return unquote(url_string[start:end])
@@ -84,8 +85,8 @@ def response(resp):
content = extract_text(result.xpath(content_xpath)[0])
# append result
- results.append({'url': url,
- 'title': title,
+ results.append({'url': url,
+ 'title': title,
'content': content})
# if no suggestion found, return results