Commit Graph

72 Commits (a757c2f005f38a97d7ebe53ab7271e26c13b7197)

Author SHA1 Message Date
Adam Tauber 16ff8d06c7 [fix] bing paging and language support
see https://msdn.microsoft.com/en-us/library/ff795620.aspx for bing
specific search operators

closes #755
8 years ago
dalf fbb080f358 Change plugin API :
- pre_search(request, search)
- post_search(request, search)
- on_result(request, search, result)

with
- request is the Flask request
- search a searx.Search instance
- result a searx result as usual
8 years ago
dalf 67e11c42b9 Clean up the architecture
Purposes :
- isolate the plugins calls
- distinction between parsing the web request and running the search (Search class). To be able to test code easily, to run searx code outside a web server, to filter the search query parameters with plugins more easily, etc...

Details :
- request.request_data contains request.form or request.args (initialize inside pre_request() function)
- Query class is renamed RawTextQuery
- SearchQuery class defines all search parameters
- get_search_query_from_webapp create a SearchQuery instance (basically the previous Search.__init__ code)
- Search class and SearchWithPlugins class takes a SearchQuery instance as class constructor parameter
- SearchWithPlugins class inherites from Search class, and run plugins
- A dedicated function search_with_plugins executes plugins to have a well define locals() (which is used by the plugins code).
- All plugins code is executed inside the try...except block (webapp.py, index function)
- advanced_search HTTP parameter value stays in webapp.py (it is only part of UI)
- multiple calls to result_container.get_ordered_results() doesn't compute the order multiple time (note : this method was call only once before)
- paging value is stored in the result_container class (compute in the extend method)
- test about engine.suspend_end_time is done during search method call (instead of __init__)
- check that the format parameter value is one of these : html, rss, json, rss (before the html value was assumed but some text formatting wasn't not done)
8 years ago
Noémi Ványi 1490d6bc93 add time range search for flickr 8 years ago
Noémi Ványi 5c02b9ef31 add time range support for bing images 8 years ago
Noémi Ványi d2e0cbafb2 add time range search for youtube noapi 8 years ago
Noémi Ványi f70d405202 add time range search for bing news 8 years ago
Noémi Ványi 53c9fde992 fix kickass torrents engine 8 years ago
Adam Tauber 629fa4355a [fix] gecko driver cannot detect the page load finish on preferences form submit. It now works with this dirty workaround.. 8 years ago
Alexander Minges 3c5883408c initial commit of pdbe engine
Adds support for queries to the Protein Data Bank Europe (PDBe).
8 years ago
Pydo 55a5b686ed Merge branch 'master' of https://github.com/asciimoo/searx into feature/seedpeer-engine-integration
Resolved conflict searx/settings.yml
8 years ago
Adam Tauber 295fc9ce96 [fix] robot test engine names II. 8 years ago
Adam Tauber bee7b497a3 [mod] rename "default" theme to "legacy" 8 years ago
marc d1d4ed4376 [fix] results with digbit don't truncate anymore 8 years ago
firebovine f67db1e107 fix tests to reflect: Wolfram|Alpha (input) response 8 years ago
marc 09ee2aa69d [fix] Result text in Wolfram|Alpha (#607) 8 years ago
Pydo ec4a03628e Put html fixture in file to be pep8 line length compliant 8 years ago
Pydo aa85045a7d Added seedpeer unitests 8 years ago
Adam Tauber 7591c8bfe3 Merge pull request #672 from kvch/self-info-paging
Self information on later pages
8 years ago
Adam Tauber 3043c404e4 Merge pull request #671 from kvch/custom-404
Custom 404 message - fixes #317
8 years ago
Noemi Vanyi aa227180e2 remove self info answers from pages after first one 8 years ago
Noemi Vanyi 0056c4035e add custom 404 page 8 years ago
Adam Tauber f693a54ad7 Merge pull request #664 from kvch/uncapitalize-searx
uncapitalize searx in templates
8 years ago
Noémi Ványi 4bd44cd98f uncapitalize searx in templates 8 years ago
Noemi Vanyi 6dd5f7a8c9 add digbt unittest 8 years ago
Adam Tauber eb57481450 [fix] google images paging - closes #571 8 years ago
marc ad58b14be7 [fix] merge infoboxes based on weight
also minor changes in attributes and images from wikidata
8 years ago
marc a0a1284998 wikidata refactor and more attributes (see issue #560) 8 years ago
Adam Tauber 350a84520d [fix] time range detection 8 years ago
Noemi Vanyi ba590de7f1 [fix] deviantart engine xpaths 8 years ago
Adam Tauber aa09f963eb Merge pull request #621 from stepshal/anomalous-backslash-in-string
Fix anomalous backslash in string
8 years ago
Adam Tauber c75d0d1532 [fix] result count tests 8 years ago
Adam Tauber f7a3e9771d Merge pull request #615 from mmuman/scanr
Add ScanR structures search engine
8 years ago
a01200356 8fc4b8156a [fix] multilingual duckduckgo
only works if both country and language are set
8 years ago
François Revol 1dba6dcbac Add ScanR structures search engine
In theory ScanR should also search for projects but the API is different,
so we'd need another engine.
8 years ago
stepshal b3ab221b98 Fix anomalous backslash in string 8 years ago
stepshal cd9b494cb5 Fix quantity of blank lines after code object. 8 years ago
François Revol b538de568a Add INA search engine 8 years ago
Adam Tauber 257e52954a [enh][fix] update to latest dependencies ++ fix tests & travis test runner
WARNING: dependency changes
8 years ago
Maxqia 56e53c9297 [fix] currency_convert: make unit tests pass
also make regex more efficent and normalize 's'es
8 years ago
a01200356 6dca14e95d [enh] multilingual duckduckgo_definitions 8 years ago
a01200356 8d335dbdae [enh] wikipedia infobox
creates simple multilingual infobox using wikipedia's api
8 years ago
Kirill Isakov d98024c26e Update Reddit unit test -- check for img_src 8 years ago
Adam Tauber 85c0351dca Merge pull request #526 from ukwt/anime
Add a few search engines
8 years ago
Kirill Isakov d54e82dfb9 Revert to using random UA in Reddit search engine 8 years ago
Adam Tauber 5544fdb756 Merge pull request #531 from guyou/add-doku-engine
Add doku engine
8 years ago
Noemi Vanyi f0fd9ad628 add unit && robot tests 8 years ago
Noemi Vanyi fe691a0988 new preferences handling
Preferences class was introduced in order to handle user preferences. Right now
it parses cookies and the form in preferences. Also it can retrieve settings
based on the name of the setting.

ATTENTION
Please note that engine preferences are handled differently from now on. So it
introduces incompatible changes. Every user who has saved preferences should reset and
save his/her settings again.

This change was needed, because everytime a default disabled engine was
added saved user preferences would broke. Now engine setting tracking is
fixed.
8 years ago
Adam Tauber 9331fc28a8 [fix] broken google images parsing 8 years ago
Guilhem Bonnefille bb29a910f2 Fix pep8 about too long lines
Code is refactored and example data are truncated.
8 years ago