mirror of
https://github.com/searxng/searxng.git
synced 2026-07-26 18:01:33 +00:00
Compare commits
2 Commits
4dfc47584d
...
150b2e21fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
150b2e21fd | ||
|
|
02f5002a5f |
@@ -9,6 +9,7 @@
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from datetime import datetime
|
||||
from html import unescape
|
||||
import time
|
||||
import json
|
||||
|
||||
@@ -119,11 +120,15 @@ def parse_general(data):
|
||||
except (ValueError, TypeError):
|
||||
published_date = None
|
||||
|
||||
# title and content sometimes containing characters such as & ' " etc...
|
||||
title = unescape(entry["title"])
|
||||
content = unescape(entry.get("abs", ""))
|
||||
|
||||
results.append(
|
||||
{
|
||||
"title": entry["title"],
|
||||
"title": title,
|
||||
"url": entry["url"],
|
||||
"content": entry.get("abs", ""),
|
||||
"content": content,
|
||||
"publishedDate": published_date,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -53,9 +53,9 @@ about = {
|
||||
categories = ['general', 'web']
|
||||
paging = True
|
||||
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
|
||||
safesearch = True
|
||||
|
||||
@@ -47,9 +47,9 @@ about = {
|
||||
categories = ['images', 'web']
|
||||
paging = True
|
||||
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
|
||||
|
||||
@@ -51,9 +51,9 @@ about = {
|
||||
categories = ['science', 'scientific publications']
|
||||
paging = True
|
||||
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
|
||||
time_range_support = True
|
||||
|
||||
Reference in New Issue
Block a user