From 78365ffb8a083ca3e3ea905db12bdac9f273f460 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Tue, 6 Jun 2017 22:20:20 +0200 Subject: [enh] add init function to engines which loads parallel --- searx/engines/soundcloud.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'searx/engines/soundcloud.py') diff --git a/searx/engines/soundcloud.py b/searx/engines/soundcloud.py index 41b40da61..d59755e04 100644 --- a/searx/engines/soundcloud.py +++ b/searx/engines/soundcloud.py @@ -41,6 +41,7 @@ embedded_url = '' cid_re = re.compile(r'client_id:"([^"]*)"', re.I | re.U) +guest_client_id = '' def get_client_id(): @@ -63,8 +64,10 @@ def get_client_id(): return "" -# api-key -guest_client_id = get_client_id() +def init(): + global guest_client_id + # api-key + guest_client_id = get_client_id() # do search-request -- cgit v1.2.3-54-g00ecf