mirror of
https://github.com/searxng/searxng.git
synced 2025-08-03 10:32:21 +02:00
[feat] add Sogou WeChat article search support
This commit is contained in:
parent
97aa5a779b
commit
76f52b5b45
4 changed files with 88 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
import json
|
||||
import re
|
||||
from urllib.parse import quote_plus
|
||||
from urllib.parse import urlencode
|
||||
|
||||
# about
|
||||
about = {
|
||||
|
@ -16,12 +16,18 @@ about = {
|
|||
|
||||
# engine dependent config
|
||||
categories = ["images"]
|
||||
paging = True
|
||||
|
||||
base_url = "https://pic.sogou.com"
|
||||
|
||||
|
||||
def request(query, params):
|
||||
params["url"] = f"{base_url}/pics?query={quote_plus(query)}"
|
||||
query_params = {
|
||||
"query": query,
|
||||
"start": (params["pageno"] - 1) * 48,
|
||||
}
|
||||
|
||||
params["url"] = f"{base_url}/pics?{urlencode(query_params)}"
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue