summaryrefslogtreecommitdiff
path: root/searx/engines/wolframalpha_noapi.py
AgeCommit message (Collapse)Author
2025-09-26[upd] pypi: Bump black from 24.3.0 to 25.9.0 (#5251)Markus Heiser
In 25.1.0 [2] an old bug has been fixed: "Docstring formatting does not apply to module docstrings" [3]. [1] https://github.com/psf/black/blob/main/CHANGES.md#2590 [2] https://github.com/psf/black/blob/main/CHANGES.md#2510 [3] https://github.com/psf/black/issues/4094 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-09-03[mod] drop: from __future__ import annotationsMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-05-03[mod] engines: migration of the individual cache solutions to EngineCacheMarkus Heiser
The EngineCache class replaces all previously individual solutions for caches in the context of the engines. - demo_offline.py - duckduckgo.py - radio_browser.py - soundcloud.py - startpage.py - wolframalpha_api.py - wolframalpha_noapi.py Search term to test most of the modified engines:: !ddg !rb !sc !sp !wa test !ddg !rb !sc !sp !wa foo For introspection of the DB, jump into developer environment and run command to show cache state:: $ ./manage pyenv.cmd bash --norc --noprofile (py3) python -m searx.enginelib cache state cache tables and key/values =========================== [demo_offline ] 2025-04-22 11:32:50 count --> (int) 4 [startpage ] 2025-04-22 12:32:30 SC_CODE --> (str) fSOBnhEMlDfE20 [duckduckgo ] 2025-04-22 12:32:31 4dff493e.... --> (str) 4-128634958369380006627592672385352473325 [duckduckgo ] 2025-04-22 12:40:06 3e2583e2.... --> (str) 4-263126175288871260472289814259666848451 [radio_browser ] 2025-04-23 11:33:08 servers --> (list) ['https://de2.api.radio-browser.info', ...] [soundcloud ] 2025-04-29 11:40:06 guest_client_id --> (str) EjkRJG0BLNEZquRiPZYdNtJdyGtTuHdp [wolframalpha ] 2025-04-22 12:40:06 code --> (str) 5aa79f86205ad26188e0e26e28fb7ae7 number of tables: 6 number of key/value pairs: 7 In the "cache tables and key/values" section, the table name (engine name) is at first position on the second there is the calculated expire date and on the third and fourth position the key/value is shown. About duckduckgo: The *vqd coode* of ddg depends on the query term and therefore the key is a hash value of the query term (to not to store the raw query term). In the "properties of ENGINES_CACHE" section all properties of the SQLiteAppl / ExpireCache and their last modification date are shown:: properties of ENGINES_CACHE =========================== [last modified: 2025-04-22 11:32:27] DB_SCHEMA : 1 [last modified: 2025-04-22 11:32:27] LAST_MAINTENANCE : [last modified: 2025-04-22 11:32:27] crypt_hash : ca612e3566fdfd7cf7efe2b1c9349f461158d07cb78a3750e5c5be686aa8ebdc [last modified: 2025-04-22 11:32:30] CACHE-TABLE--demo_offline: demo_offline [last modified: 2025-04-22 11:32:30] CACHE-TABLE--startpage: startpage [last modified: 2025-04-22 11:32:31] CACHE-TABLE--duckduckgo: duckduckgo [last modified: 2025-04-22 11:33:08] CACHE-TABLE--radio_browser: radio_browser [last modified: 2025-04-22 11:40:06] CACHE-TABLE--soundcloud: soundcloud [last modified: 2025-04-22 11:40:06] CACHE-TABLE--wolframalpha: wolframalpha These properties provide information about the state of the ExpireCache and control the behavior. For example, the maintenance intervals are controlled by the last modification date of the LAST_MAINTENANCE property and the hash value of the password can be used to detect whether the password has been changed (in this case the DB entries can no longer be decrypted and the entire cache must be discarded). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
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-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-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2019-10-16add initial support for offline engines && command engineNoémi Ványi
2017-06-06[enh] add init function to engines which loads parallelAdam Tauber
2017-05-15[enh] py3 compatibilityAdam Tauber
2016-12-09[mod] do not escape html content in enginesAdam Tauber
2016-09-10#607 - noapi fixfirebovine
2016-09-10[fix] Result text in Wolfram|Alpha (#607)marc
2016-08-13[fix] remove unused imports ++ int token timestamp by defaultAdam Tauber
2016-02-28[fix] remove unnecesary async calls in wolframalpha_noapia01200356
setting async to false in the request did the job, lol.
2016-02-28[fix] merge with 79705450dfdf321c19839bce23c56d9d4a86ba68a01200356
2016-02-28[enh] unit tests for wolframalphaa01200356
2016-02-27[enh] infobox for wolframalphaa01200356
TODO: - infobox styles - unit tests ISSUES: - no_api version needs to re-call server for additional pods, such as plots. therefore, it's even slower than before. comment out the part that calls get_async_pod if requests reach timeout or increase timeout in settings.yml.
2016-02-25[fix] wolframalpha unicode inputsAdam Tauber
2016-02-17[fix] encapsulate wolframalpha token fetching errorsAdam Tauber
2016-02-17[fix] wolframalpha page changesAdam Tauber
related issues: #508 #509
2016-01-18[fix] pep8a01200356
2016-01-03[fix] test in wolframalpha_noapia01200356
2016-01-03add tests for unicode strings in wolframalphaa01200356
2016-01-03[fix] unescape htmlentities in wolframalpha_noapi's answera01200356
2016-01-02[fix] pass wolframalpha_noapi testsa01200356
2016-01-02update tests for wolframalphaa01200356
2016-01-01[enh] wolframalpha appends resulta01200356
2015-12-30Add tests for the Wolfram Alpha engines (both API and NO API versions)a01200356
2015-12-29Make wolframalpha_noapi.py flake8 complianta01200356
2015-12-29Remove unnecessary code in wolframalpha_noapi enginea01200356
The answer is scraped from a js function, so parsing the html tree doesn't achieve anything here.
2015-12-29Wolfram Alpha (no API needed now)a01200356