.oO SearXNG Developer Documentation Oo.
|
Functions | |
time_range_args (params) | |
detect_google_captcha (dom) | |
request (query, params) | |
parse_gs_a (Optional[str] text) | |
response (resp) | |
Variables | |
logging | logger .Logger |
dict | about |
list | categories = ['science', 'scientific publications'] |
bool | paging = True |
int | max_page = 50 |
bool | language_support = True |
bool | time_range_support = True |
bool | safesearch = False |
bool | send_accept_language_header = True |
This is the implementation of the Google Scholar engine. Compared to other Google services the Scholar engine has a simple GET REST-API and there does not exists `async` API. Even though the API slightly vintage we can make use of the :ref:`google API` to assemble the arguments of the GET request.
searx.engines.google_scholar.detect_google_captcha | ( | dom | ) |
In case of CAPTCHA Google Scholar open its own *not a Robot* dialog and is not redirected to ``sorry.google.com``.
Definition at line 84 of file google_scholar.py.
searx.engines.google_scholar.parse_gs_a | ( | Optional[str] | text | ) |
Parse the text written in green. Possible formats: * "{authors} - {journal}, {year} - {publisher}" * "{authors} - {year} - {publisher}" * "{authors} - {publisher}"
Definition at line 114 of file google_scholar.py.
searx.engines.google_scholar.request | ( | query, | |
params ) |
Google-Scholar search request
Definition at line 92 of file google_scholar.py.
References searx.engines.google_scholar.time_range_args().
searx.engines.google_scholar.response | ( | resp | ) |
Parse response from Google Scholar
Definition at line 150 of file google_scholar.py.
searx.engines.google_scholar.time_range_args | ( | params | ) |
Returns a dictionary with a time range arguments based on ``params['time_range']``. Google Scholar supports a detailed search by year. Searching by *last month* or *last week* (as offered by SearXNG) is uncommon for scientific publications and is not supported by Google Scholar. To limit the result list when the users selects a range, all the SearXNG ranges (*day*, *week*, *month*, *year*) are mapped to *year*. If no range is set an empty dictionary of arguments is returned. Example; when user selects a time range (current year minus one in 2022): .. code:: python { 'as_ylo' : 2021 }
Definition at line 60 of file google_scholar.py.
Referenced by searx.engines.google_scholar.request().
dict searx.engines.google_scholar.about |
Definition at line 41 of file google_scholar.py.
list searx.engines.google_scholar.categories = ['science', 'scientific publications'] |
Definition at line 51 of file google_scholar.py.
bool searx.engines.google_scholar.language_support = True |
Definition at line 54 of file google_scholar.py.
logging searx.engines.google_scholar.logger .Logger |
Definition at line 36 of file google_scholar.py.
int searx.engines.google_scholar.max_page = 50 |
Definition at line 53 of file google_scholar.py.
bool searx.engines.google_scholar.paging = True |
Definition at line 52 of file google_scholar.py.
bool searx.engines.google_scholar.safesearch = False |
Definition at line 56 of file google_scholar.py.
bool searx.engines.google_scholar.send_accept_language_header = True |
Definition at line 57 of file google_scholar.py.
bool searx.engines.google_scholar.time_range_support = True |
Definition at line 55 of file google_scholar.py.