diff options
| author | pw3t <romain@berthor.fr> | 2014-01-05 17:57:55 +0100 |
|---|---|---|
| committer | pw3t <romain@berthor.fr> | 2014-01-05 17:57:55 +0100 |
| commit | 0d93ad20186937f86ca9101c1c7453e99c282107 (patch) | |
| tree | 1ff55038c8df267d8a3a1d4f33fbd4101546bf5d /searx/engines/filecrop.py | |
| parent | 89183ed985157540c42c73c5a303dd574c227c7f (diff) | |
| parent | 5c9f6d51746796ef63cd08d27c31e931272e083f (diff) | |
Merge branch 'master' of https://github.com/asciimoo/searx
Diffstat (limited to 'searx/engines/filecrop.py')
| -rw-r--r-- | searx/engines/filecrop.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/searx/engines/filecrop.py b/searx/engines/filecrop.py index a1a933db9..52426b84a 100644 --- a/searx/engines/filecrop.py +++ b/searx/engines/filecrop.py @@ -1,6 +1,4 @@ -from json import loads from urllib import urlencode -from searx.utils import html_to_text from HTMLParser import HTMLParser url = 'http://www.filecrop.com/' @@ -10,7 +8,7 @@ class FilecropResultParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.__start_processing = False - + self.results = [] self.result = {} @@ -22,7 +20,7 @@ class FilecropResultParser(HTMLParser): if tag == 'tr': if ('bgcolor', '#edeff5') in attrs or ('bgcolor', '#ffffff') in attrs: self.__start_processing = True - + if not self.__start_processing: return @@ -50,7 +48,7 @@ class FilecropResultParser(HTMLParser): self.data_counter = 0 self.results.append(self.result) self.result = {} - + def handle_data(self, data): if not self.__start_processing: return @@ -59,7 +57,7 @@ class FilecropResultParser(HTMLParser): self.result['content'] += data + ' ' else: self.result['content'] = data + ' ' - + self.data_counter += 1 def request(query, params): |