.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.engines.sepiasearch Namespace Reference

Functions

 request (query, params)
 
 response (resp)
 

Variables

logging logger .Logger
 
dict about
 
list categories = ['videos']
 
bool paging = True
 
str base_url = 'https://sepiasearch.org'
 
bool time_range_support = True
 
bool safesearch = True
 

Detailed Description

SepiaSearch uses the same languages as :py:obj:`Peertube
<searx.engines.peertube>` and the response is identical to the response from the
peertube engines.

Function Documentation

◆ request()

searx.engines.sepiasearch.request ( query,
params )
Assemble request for the SepiaSearch API

Definition at line 49 of file sepiasearch.py.

49def request(query, params):
50 """Assemble request for the SepiaSearch API"""
51
52 if not query:
53 return False
54
55 # eng_region = traits.get_region(params['searxng_locale'], 'en_US')
56 eng_lang = traits.get_language(params['searxng_locale'], None)
57
58 params['url'] = (
59 base_url.rstrip("/")
60 + "/api/v1/search/videos?"
61 + urlencode(
62 {
63 'search': query,
64 'start': (params['pageno'] - 1) * 10,
65 'count': 10,
66 # -createdAt: sort by date ascending / createdAt: date descending
67 'sort': '-match', # sort by *match descending*
68 'nsfw': safesearch_table[params['safesearch']],
69 }
70 )
71 )
72
73 if eng_lang is not None:
74 params['url'] += '&languageOneOf[]=' + eng_lang
75 params['url'] += '&boostLanguages[]=' + eng_lang
76
77 if params['time_range'] in time_range_table:
78 time = datetime.now().date() + time_range_table[params['time_range']]
79 params['url'] += '&startDate=' + time.isoformat()
80
81 return params
82
83

◆ response()

searx.engines.sepiasearch.response ( resp)

Definition at line 84 of file sepiasearch.py.

84def response(resp):
85 return video_response(resp)

Variable Documentation

◆ about

dict searx.engines.sepiasearch.about
Initial value:
1= {
2 # pylint: disable=line-too-long
3 "website": 'https://sepiasearch.org',
4 "wikidata_id": None,
5 "official_api_documentation": 'https://docs.joinpeertube.org/api-rest-reference.html#tag/Search/operation/searchVideos',
6 "use_official_api": True,
7 "require_api_key": False,
8 "results": 'JSON',
9}

Definition at line 29 of file sepiasearch.py.

◆ base_url

str searx.engines.sepiasearch.base_url = 'https://sepiasearch.org'

Definition at line 43 of file sepiasearch.py.

◆ categories

list searx.engines.sepiasearch.categories = ['videos']

Definition at line 40 of file sepiasearch.py.

◆ logger

logging searx.engines.sepiasearch.logger .Logger

Definition at line 25 of file sepiasearch.py.

◆ paging

bool searx.engines.sepiasearch.paging = True

Definition at line 41 of file sepiasearch.py.

◆ safesearch

bool searx.engines.sepiasearch.safesearch = True

Definition at line 46 of file sepiasearch.py.

◆ time_range_support

bool searx.engines.sepiasearch.time_range_support = True

Definition at line 45 of file sepiasearch.py.