Marc Abonce Seguin
d6681fd33b
remove articles number from engines_languages.json
4 years ago
Alexandre Flament
7d6e69e2f9
[upd] wikipedia engine: return an empty result on query with illegal characters
...
on some queries (like an IT error message), wikipedia returns an HTTP error 400.
this commit returns an empty result instead of showing an error to the user.
4 years ago
Marc Abonce Seguin
64e81794fe
add support for Chinese variants in Wikipedia
4 years ago
Alexandre Flament
a4dcfa025c
[enh] engines: add about variable
...
move meta information from comment to the about variable
so the preferences, the documentation can show these information
4 years ago
Alexandre Flament
d703119d3a
[enh] add raise_for_httperror
...
check HTTP response:
* detect some comme CAPTCHA challenge (no solving). In this case the engine is suspended for long a time.
* otherwise raise HTTPError as before
the check is done in poolrequests.py (was before in search.py).
update qwant, wikipedia, wikidata to use raise_for_httperror instead of raise_for_status
4 years ago
Alexandre Flament
58d51e082d
[fix] wikipedia: minor fix: return no result instead of crash in some very few cases.
...
In few cases, the JSON results doesn't contains the key 'type'.
4 years ago
Alexandre Flament
f0054d67f1
[fix] wikipedia engine: don't raise an error when the query is not found
...
Add a new parameter "raise_for_status", set by default to True.
When True, any HTTP status code >= 300 raise an exception ( #2332 )
When False, the engine can manage the HTTP status code by itself.
4 years ago
Dalf
1022228d95
Drop Python 2 (1/n): remove unicode string and url_utils
4 years ago
Marc Abonce Seguin
ab20ca182c
use Wikipedia's REST v1 API
4 years ago
Marc Abonce Seguin
77b9faa8df
fix Wikipedia's paragraph extraction
4 years ago
Marc Abonce Seguin
5706c12fba
remove empty parenthesis in wikipedia's summary
...
They're usually IPA pronunciations which are removed
by the API.
5 years ago
Marc Abonce Seguin
c18048e045
exclude disambiguation pages from wikipedia infobox
5 years ago
Adam Tauber
00512e36c1
[fix] handle empty response from wikipedia engine - closes #1114
5 years ago
Noémi Ványi
97351a2c72
fix after rebase
6 years ago
Noémi Ványi
b63d645a52
Revert "remove 'all' option from search languages"
...
This reverts commit 4d1770398a
.
6 years ago
Marc Abonce Seguin
5568f24d6c
[fix] check language aliases when setting search language
6 years ago
Marc Abonce Seguin
772c048d01
refactor engine's search language handling
...
Add match_language function in utils to match any user given
language code with a list of engine's supported languages.
Also add language_aliases dict on each engine to translate
standard language codes into the custom codes used by the engine.
7 years ago
marc
4d1770398a
remove 'all' option from search languages
7 years ago
Adam Tauber
52e615dede
[enh] py3 compatibility
8 years ago
marc
1175b3906f
change language list to only include languages with a minimum of engines
...
that support them.
users can still query lesser supported through the :lang_code bang.
8 years ago
marc
4a1ff56389
minor fixes in utils/fetch_languages.py
8 years ago
marc
af35eee10b
tests for _fetch_supported_languages in engines
...
and refactor method to make it testable without making requests
8 years ago
marc
f62ce21f50
[mod] fetch supported languages for several engines
...
utils/fetch_languages.py gets languages supported by each engine and
generates engines_languages.json with each engine's supported language.
8 years ago
marc
149802c569
[enh] add supported_languages on engines and auto-generate languages.py
8 years ago
marc
c2e4014287
[fix] urls merge in infobox ( #593 )
...
TODO:
merge attributes
8 years ago
a01200356
8d335dbdae
[enh] wikipedia infobox
...
creates simple multilingual infobox using wikipedia's api
9 years ago
Thomas Pointhuber
52ad49ccba
using general mediawiki-engine
...
* writing general mediawiki-engine
* using this engine for wikipedia
* using this engine for uncyclopedia
10 years ago
Thomas Pointhuber
bb628469d3
fix wikipedia engine and add comments
...
* add paging support
* make number_of_results changable
* make result calculation more clear
* add comments
10 years ago
asciimoo
2a788c8f29
[enh] search language support init
11 years ago
asciimoo
e7792d77a7
[mod] wikipedia engine removed
11 years ago
asciimoo
a0037313ea
[mod] wikipedia limited to first result
11 years ago
asciimoo
4bf44076d4
[enh] proper urls
11 years ago
asciimoo
e4b768b6cc
[enh] wikipedia search added
11 years ago