2 Commits

Author SHA1 Message Date
Markus Heiser
150b2e21fd [fix] make docs -> ERROR: Unknown target name: "google: max 50 pages".
Fix the issues reported by sphinx build::

    docstring of searx.engines.google.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_images.max_page:1: ERROR: Unknown target name: "google: max 50 pages".
    docstring of searx.engines.google_scholar.max_page:1: ERROR: Unknown target name: "google: max 50 pages".

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-03-27 06:57:28 +01:00
Aadniz
02f5002a5f [fix] baidu engine: properly decoding HTML escape codes 2025-03-27 06:11:39 +01:00
4 changed files with 13 additions and 8 deletions

View File

@@ -9,6 +9,7 @@
from urllib.parse import urlencode from urllib.parse import urlencode
from datetime import datetime from datetime import datetime
from html import unescape
import time import time
import json import json
@@ -119,11 +120,15 @@ def parse_general(data):
except (ValueError, TypeError): except (ValueError, TypeError):
published_date = None published_date = None
# title and content sometimes containing characters such as &amp; &#39; &quot; etc...
title = unescape(entry["title"])
content = unescape(entry.get("abs", ""))
results.append( results.append(
{ {
"title": entry["title"], "title": title,
"url": entry["url"], "url": entry["url"],
"content": entry.get("abs", ""), "content": content,
"publishedDate": published_date, "publishedDate": published_date,
} }
) )

View File

@@ -53,9 +53,9 @@ about = {
categories = ['general', 'web'] categories = ['general', 'web']
paging = True paging = True
max_page = 50 max_page = 50
"""`Google: max 50 pages`_ """`Google max 50 pages`_
.. _Google: max 50 pages: https://github.com/searxng/searxng/issues/2982 .. _Google max 50 pages: https://github.com/searxng/searxng/issues/2982
""" """
time_range_support = True time_range_support = True
safesearch = True safesearch = True

View File

@@ -47,9 +47,9 @@ about = {
categories = ['images', 'web'] categories = ['images', 'web']
paging = True paging = True
max_page = 50 max_page = 50
"""`Google: max 50 pages`_ """`Google max 50 pages`_
.. _Google: max 50 pages: https://github.com/searxng/searxng/issues/2982 .. _Google max 50 pages: https://github.com/searxng/searxng/issues/2982
""" """
time_range_support = True time_range_support = True

View File

@@ -51,9 +51,9 @@ about = {
categories = ['science', 'scientific publications'] categories = ['science', 'scientific publications']
paging = True paging = True
max_page = 50 max_page = 50
"""`Google: max 50 pages`_ """`Google max 50 pages`_
.. _Google: max 50 pages: https://github.com/searxng/searxng/issues/2982 .. _Google max 50 pages: https://github.com/searxng/searxng/issues/2982
""" """
language_support = True language_support = True
time_range_support = True time_range_support = True