summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorGabor Nagy <mail@aigeruth.hu>2014-02-05 20:24:31 +0100
committerGabor Nagy <mail@aigeruth.hu>2014-02-05 20:24:31 +0100
commit22fd0746d94ec9285561b4da9a59939931a6c088 (patch)
treec7a2b84de48cd068343f0b7986055c7f7981e31e /searx/engines
parentb22dd51bd7fc7234a40b664964a6210cbe7bf455 (diff)
downloadsearxng-22fd0746d94ec9285561b4da9a59939931a6c088.tar.gz
searxng-22fd0746d94ec9285561b4da9a59939931a6c088.zip
Improves PEP8 compatibility.
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/__init__.py8
-rw-r--r--searx/engines/bing.py2
-rw-r--r--searx/engines/dailymotion.py2
-rw-r--r--searx/engines/deviantart.py2
-rw-r--r--searx/engines/piratebay.py2
-rw-r--r--searx/engines/stackoverflow.py2
-rw-r--r--searx/engines/vimeo.py2
-rw-r--r--searx/engines/yahoo.py2
-rw-r--r--searx/engines/youtube.py3
9 files changed, 13 insertions, 12 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index d8bb27e5f..ae7128790 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -17,16 +17,16 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
'''
from os.path import realpath, dirname, splitext, join
+import sys
from imp import load_source
-import grequests
from itertools import izip_longest, chain
from operator import itemgetter
from urlparse import urlparse
-from searx import settings
-from searx.utils import gen_useragent
-import sys
from datetime import datetime
+import grequests
from flask.ext.babel import gettext
+from searx import settings
+from searx.utils import gen_useragent
engine_dir = dirname(realpath(__file__))
diff --git a/searx/engines/bing.py b/searx/engines/bing.py
index 00f66b118..9712a3103 100644
--- a/searx/engines/bing.py
+++ b/searx/engines/bing.py
@@ -1,6 +1,6 @@
-from lxml import html
from urllib import urlencode
from cgi import escape
+from lxml import html
base_url = 'http://www.bing.com/'
search_string = 'search?{query}&first={offset}'
diff --git a/searx/engines/dailymotion.py b/searx/engines/dailymotion.py
index 04f77af80..03e1d7ffc 100644
--- a/searx/engines/dailymotion.py
+++ b/searx/engines/dailymotion.py
@@ -1,6 +1,6 @@
from urllib import urlencode
-from lxml import html
from json import loads
+from lxml import html
categories = ['videos']
locale = 'en_US'
diff --git a/searx/engines/deviantart.py b/searx/engines/deviantart.py
index 602678e41..d42a25a19 100644
--- a/searx/engines/deviantart.py
+++ b/searx/engines/deviantart.py
@@ -1,6 +1,6 @@
from urllib import urlencode
-from lxml import html
from urlparse import urljoin
+from lxml import html
categories = ['images']
diff --git a/searx/engines/piratebay.py b/searx/engines/piratebay.py
index c40dacf65..ca1085141 100644
--- a/searx/engines/piratebay.py
+++ b/searx/engines/piratebay.py
@@ -1,7 +1,7 @@
-from lxml import html
from urlparse import urljoin
from cgi import escape
from urllib import quote
+from lxml import html
categories = ['videos', 'music']
diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py
index 213597243..e24b309c1 100644
--- a/searx/engines/stackoverflow.py
+++ b/searx/engines/stackoverflow.py
@@ -1,7 +1,7 @@
-from lxml import html
from urlparse import urljoin
from cgi import escape
from urllib import urlencode
+from lxml import html
categories = ['it']
diff --git a/searx/engines/vimeo.py b/searx/engines/vimeo.py
index 924497a99..a95c75b49 100644
--- a/searx/engines/vimeo.py
+++ b/searx/engines/vimeo.py
@@ -1,7 +1,7 @@
from urllib import urlencode
from HTMLParser import HTMLParser
-from xpath import extract_text
from lxml import html
+from xpath import extract_text
base_url = 'http://vimeo.com'
search_url = base_url + '/search?{query}'
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index 436a2d7a6..3dba4c432 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
from urllib import urlencode
-from searx.engines.xpath import extract_text, extract_url
from lxml import html
+from searx.engines.xpath import extract_text, extract_url
categories = ['general']
search_url = 'http://search.yahoo.com/search?{query}&b={offset}'
diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py
index 208254317..6e4e8859a 100644
--- a/searx/engines/youtube.py
+++ b/searx/engines/youtube.py
@@ -3,7 +3,8 @@ from urllib import urlencode
categories = ['videos']
-search_url = 'https://gdata.youtube.com/feeds/api/videos?alt=json&{query}&start-index={index}&max-results=25' # noqa
+search_url = ('https://gdata.youtube.com/feeds/api/videos'
+ '?alt=json&{query}&start-index={index}&max-results=25') # noqa
paging = True