Commit Graph

25 Commits

Author SHA1 Message Date
Markus Heiser
aecfb2300d [mod] one logger per engine - drop obsolete logger.getChild
Remove the no longer needed `logger = logger.getChild(...)` from engines.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-06 18:05:46 +02:00
Alexandre Flament
d14994dc73 [httpx] replace searx.poolrequests by searx.network
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-04-12 17:25:56 +02:00
Alexandre Flament
38c210d746
[mod] soundcloud: faster initialization
The get_cliend_id() function:
* fetches https://soundcloud.com
* then fetches each referenced javascript URL to get the client id.

This commit fetches the javascript URLs in the reverse order: the client id is in the last javascript URL.
2021-03-21 09:29:53 +01:00
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
2021-01-14 20:57:17 +01:00
Alexandre Flament
deb1bde20d [fix] soundclound: accept result without content 2020-12-07 17:45:36 +01:00
Alexandre Flament
3038052c79 [mod] remove unused import
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-11-14 14:11:02 +01:00
Dalf
1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
Markus Heiser
2aa95c16e3 [fix] soundcloud: URLs of JS sources has been moved
The client_id is found under (new) URL:

  https://a-v2.sndcdn.com/assets/49-a0c01933-3.js

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2019-11-29 15:05:36 +01:00
Noémi Ványi
a6f20caf32 add initial support for offline engines && command engine 2019-10-16 15:52:48 +02:00
Dalf
da0ce5880f [fix] fix soundcloud engine, speed up searx start time 2019-07-19 08:59:11 +02:00
Adam Tauber
78365ffb8a [enh] add init function to engines which loads parallel 2017-06-06 22:20:20 +02:00
Adam Tauber
52e615dede [enh] py3 compatibility 2017-05-15 12:02:30 +02:00
stepshal
7e16c9d360 Add missing blank lines after class or function definition. 2016-08-11 17:18:12 +07:00
misnyo
dc55d87e92 [fix]soundcloud.com guest client_id fetches dynamically 2016-01-02 13:06:02 +01:00
Alexandre Flament
4689fe341c update versions.cfg to use the current up-to-date packages 2015-05-02 15:45:17 +02:00
Cqoicebordel
4a195e0b28 Integrated media in results + Deezer Engine
New "embedded" item for the results, allow to give an iframe to display the media directly in the results.
Note that the attributes src of the iframes are not set, but instead data-src is set, allowing to only load the iframe when clicked.

Deezer engine based on public API (no key).
2015-01-05 02:04:23 +01:00
Thomas Pointhuber
a508d540ac [fix] pep8 2014-12-16 17:26:16 +01:00
dalf
7c13d630e4 [fix] pep8 : engines (errors E121, E127, E128 and E501 still exist) 2014-12-07 16:37:56 +01:00
Thomas Pointhuber
64a68a7296 update soundcloud and add comments 2014-09-02 18:12:30 +02:00
Adam Tauber
66f02dc2b6 [fix] unused globals removed 2014-07-09 01:18:37 +02:00
asciimoo
6cbf9bf67d [enh] paging support for soundcloud 2014-01-30 01:50:15 +01:00
asciimoo
b2492c94f4 [fix] pep/flake8 compatibility 2014-01-20 02:31:20 +01:00
asciimoo
74b6be3991 [enh] engine cfg compatibilty 2013-10-23 23:55:37 +02:00
asciimoo
7b6e5b5d14 [enh] soundcloud playlists 2013-10-20 00:52:32 +02:00
asciimoo
b915386456 [enh] soundcloud search added 2013-10-17 21:21:23 +02:00