浏览代码

[fix] gitlab search fixed for proper api usage

misnyo 7 年前
父节点
当前提交
9b6307a365
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7
    6
      searx/settings.yml

+ 7
- 6
searx/settings.yml 查看文件

242
     disabled: True
242
     disabled: True
243
 
243
 
244
   - name : gitlab
244
   - name : gitlab
245
-    engine : xpath
245
+    engine : json_engine
246
     paging : True
246
     paging : True
247
-    search_url : https://gitlab.com/search?page={pageno}&search={query}
248
-    url_xpath : //li[@class="project-row"]//a[@class="project"]/@href
249
-    title_xpath : //li[@class="project-row"]//span[contains(@class, "project-full-name")]
250
-    content_xpath : //li[@class="project-row"]//div[@class="description"]/p
247
+    search_url : https://gitlab.com/api/v4/projects?search={query}&page={pageno}
248
+    url_query : web_url
249
+    title_query : name_with_namespace
250
+    content_query : description
251
+    page_size : 20
251
     categories : it
252
     categories : it
252
     shortcut : gl
253
     shortcut : gl
253
-    timeout : 5.0
254
+    timeout : 10.0
254
     disabled : True
255
     disabled : True
255
 
256
 
256
   - name : github
257
   - name : github