summaryrefslogtreecommitdiff
path: root/searx/engines/wikidata.py
AgeCommit message (Collapse)Author
2022-02-06wikidata: load thumbnail instead of full imageLéon Tiekötter
2022-02-06[fix] wikidata info box imagesLéon Tiekötter
Wikidata info box images are now loaded from uploads.wikimedia.org instead of commons.wikimedia.org to prevent redirects Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[fix] issues reported by pylintMarkus Heiser
Fix pylint issues from commit (3d96a983) [format.python] initial formatting of the python code Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] disable py code formatting for some hunks of codeMarkus Heiser
Disable the python code formatting from python-black, where the readability of code suffers by formatting. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-06[mod] one logger per engine - drop obsolete logger.getChildMarkus Heiser
Remove the no longer needed `logger = logger.getChild(...)` from engines. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-04-12[httpx] replace searx.poolrequests by searx.networkAlexandre Flament
settings.yml: * outgoing.networks: * can contains network definition * propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections, keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries * retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time) * local_addresses can be "192.168.0.1/24" (it supports IPv6) * support_ipv4 & support_ipv6: both True by default see https://github.com/searx/searx/pull/1034 * each engine can define a "network" section: * either a full network description * either reference an existing network * all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
2021-01-14[enh] engines: add about variableAlexandre Flament
move meta information from comment to the about variable so the preferences, the documentation can show these information
2020-12-11[enh] add raise_for_httperrorAlexandre Flament
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
2020-12-04[fix] wikidata: fix crash when the item has no description at all and at ↵Alexandre Flament
least one URL.
2020-12-01[mod] wikidata: WDGeoAttribute class: doesn't change the method signature of ↵Alexandre Flament
get_str
2020-11-14[mod] remove unused importAlexandre Flament
use from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url # NOQA so it is possible to easily remove all unused import using autoflake: autoflake --in-place --recursive --remove-all-unused-imports searx tests
2020-10-28[mod] wikidata engine: use one SPARQL request instead of 2 HTTP requests.Alexandre Flament
2020-10-02[mod] move extract_text, extract_url to searx.utilsAlexandre Flament
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-08-27only return one url per "type" in Wikidata (#2151)Marc Abonce Seguin
i.e. only one official website, one Twitter, etc.
2020-06-09[enh] add official site link to the top of the infobox - closes #1644Adam Tauber
2019-11-15[mod] speed optimizationDalf
compile XPath only once avoid redundant call to urlparse get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
2019-07-29[fix] wikidata engine: faster processing, remove one HTTP redirection.Dalf
* Search URL is https://www.wikidata.org/w/index.php?{query}&ns0=1 (with ns0=1 at the end to avoid an HTTP redirection) * url_detail: remove the disabletidy=1 deprecated parameter * Add eval_xpath function: compile once for all xpath. * Add get_id_cache: retrieve all HTML with an id, avoid the slow to procress dynamic xpath '//div[@id="{propertyid}"]'.replace('{propertyid}') * Create an etree.HTMLParser() instead of using the global one (see #1575)
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2019-01-06[fix] check language aliases when setting search languageMarc Abonce Seguin
2018-07-06Fix formattingLéo Bourrel
2018-07-05Update path to wikidata imageLéo Bourrel
2018-04-08[fix] make search requests on wikidata more accurateMarc Abonce Seguin
2018-03-27refactor engine's search language handlingMarc Abonce Seguin
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.
2017-12-06remove 'all' option from search languagesmarc
2017-05-15[enh] py3 compatibilityAdam Tauber
2016-12-15tests for _fetch_supported_languages in enginesmarc
and refactor method to make it testable without making requests
2016-12-13[mod] fetch supported languages for several enginesmarc
utils/fetch_languages.py gets languages supported by each engine and generates engines_languages.json with each engine's supported language.
2016-12-13[enh] add supported_languages on engines and auto-generate languages.pymarc
2016-08-05[fix] merge infoboxes based on weightmarc
also minor changes in attributes and images from wikidata
2016-08-05wikidata refactor and more attributes (see issue #560)marc
2016-08-05[enh] multilingual wikidataa01200356
disambiguation and tags are in local language TOFIX: needs to query the api every time to know each label's name
2016-04-17[enh] wikipedia infoboxa01200356
creates simple multilingual infobox using wikipedia's api
2016-01-18[fix] pep8 compatibiltyAdam Tauber
2015-09-07[fix][mod] wikidata date handling refactor - fixes #387Adam Tauber
2015-01-21[enh] use one single http connection pool : improve response time. close #100dalf
2015-01-11[fix] dates before 1900Adam Tauber
2015-01-02[fix] pep8Adam Tauber
2014-12-09Use human readable dateCqoicebordel
For DoB and DoD, wikipedia use a non standard ISO format, not easily readable. Now the date is displayed in an human readable form, using the language setting as locale if available. If not, it uses the default locale.
2014-12-07[fix] pep8 : duckduckgo_definitions and wikidata enginesdalf
2014-10-12[fix] wikidata: using only the first urlAdam Tauber
2014-10-11[enh] infoboxes : if the result doesn't contain anything except one link, ↵dalf
use the normal result template
2014-10-11[mod] return only one result from the wikidata enginedalf
2014-10-04[fix] code cleanupAdam Tauber
2014-10-02[enh] wikidata engine : add links to musicbrainzdalf
2014-10-01[enh] add infoboxes and answers (clean up)Dalf
2014-09-28[enh] add infoboxes and answersDalf