mirror of
https://github.com/searxng/searxng.git
synced 2026-08-06 23:31:24 +00:00
Compare commits
2 Commits
4dfc47584d
...
150b2e21fd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
150b2e21fd | ||
|
|
02f5002a5f |
@@ -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 & ' " 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,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user