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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
list categories = ['videos']
 
bool paging = True
 
bool time_range_support = False
 
bool safesearch = False
 

Detailed Description

MediathekViewWeb (API)

Function Documentation

◆ request()

searx.engines.mediathekviewweb.request ( query,
params )

Definition at line 25 of file mediathekviewweb.py.

25def request(query, params):
26
27 params['url'] = 'https://mediathekviewweb.de/api/query'
28 params['method'] = 'POST'
29 params['headers']['Content-type'] = 'text/plain'
30 params['data'] = dumps(
31 {
32 'queries': [
33 {
34 'fields': [
35 'title',
36 'topic',
37 ],
38 'query': query,
39 },
40 ],
41 'sortBy': 'timestamp',
42 'sortOrder': 'desc',
43 'future': True,
44 'offset': (params['pageno'] - 1) * 10,
45 'size': 10,
46 }
47 )
48 return params
49
50

◆ response()

searx.engines.mediathekviewweb.response ( resp)

Definition at line 51 of file mediathekviewweb.py.

51def response(resp):
52
53 resp = loads(resp.text)
54
55 mwv_result = resp['result']
56 mwv_result_list = mwv_result['results']
57
58 results = []
59
60 for item in mwv_result_list:
61
62 item['hms'] = str(datetime.timedelta(seconds=item['duration']))
63
64 results.append(
65 {
66 'url': item['url_video_hd'].replace("http://", "https://"),
67 'title': "%(channel)s: %(title)s (%(hms)s)" % item,
68 'length': item['hms'],
69 'content': "%(description)s" % item,
70 'iframe_src': item['url_video_hd'].replace("http://", "https://"),
71 'template': 'videos.html',
72 }
73 )
74
75 return results

Variable Documentation

◆ about

dict searx.engines.mediathekviewweb.about
Initial value:
1= {
2 "website": 'https://mediathekviewweb.de/',
3 "wikidata_id": 'Q27877380',
4 "official_api_documentation": 'https://gist.github.com/bagbag/a2888478d27de0e989cf777f81fb33de',
5 "use_official_api": True,
6 "require_api_key": False,
7 "results": 'JSON',
8 "language": "de",
9}

Definition at line 9 of file mediathekviewweb.py.

◆ categories

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

Definition at line 19 of file mediathekviewweb.py.

◆ paging

bool searx.engines.mediathekviewweb.paging = True

Definition at line 20 of file mediathekviewweb.py.

◆ safesearch

bool searx.engines.mediathekviewweb.safesearch = False

Definition at line 22 of file mediathekviewweb.py.

◆ time_range_support

bool searx.engines.mediathekviewweb.time_range_support = False

Definition at line 21 of file mediathekviewweb.py.