Selaa lähdekoodia

Merge branch 'master' into searchpy2

Alexandre Flament 8 vuotta sitten
vanhempi
commit
219f047bf3
2 muutettua tiedostoa jossa 12 lisäystä ja 1 poistoa
  1. 2
    1
      searx/search.py
  2. 10
    0
      searx/settings.yml

+ 2
- 1
searx/search.py Näytä tiedosto

@@ -323,7 +323,8 @@ class Search(object):
323 323
             engine = engines[selected_engine['name']]
324 324
 
325 325
             # skip suspended engines
326
-            if engine.suspend_end_time and engine.suspend_end_time <= time():
326
+            if engine.suspend_end_time >= time():
327
+                logger.debug('Engine currently suspended: %s', selected_engine['name'])
327 328
                 continue
328 329
 
329 330
             # if paging is not supported, skip

+ 10
- 0
searx/settings.yml Näytä tiedosto

@@ -313,6 +313,16 @@ engines:
313 313
     timeout : 4.0
314 314
     disabled : True
315 315
 
316
+  - name : lobste.rs
317
+    engine : xpath
318
+    search_url : https://lobste.rs/search?utf8=%E2%9C%93&q={query}&what=stories&order=relevance
319
+    results_xpath : //li[contains(@class, "story")]
320
+    url_xpath : .//span[@class="link"]/a/@href
321
+    title_xpath : .//span[@class="link"]/a
322
+    content_xpath : .//a[@class="domain"]
323
+    categories : it
324
+    shortcut : lo
325
+
316 326
   - name : microsoft academic
317 327
     engine : json_engine
318 328
     paging : True