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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
list categories = ['videos']
 
bool paging = True
 
str base_url = 'https://vimeo.com/'
 
str search_url = base_url + 'search/page:{pageno}?{query}'
 

Detailed Description

 Wikipedia (Web

Function Documentation

◆ request()

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

Definition at line 32 of file vimeo.py.

32def request(query, params):
33 params['url'] = search_url.format(pageno=params['pageno'], query=urlencode({'q': query}))
34
35 return params
36
37
38# get response from search-request

◆ response()

searx.engines.vimeo.response ( resp)

Definition at line 39 of file vimeo.py.

39def response(resp):
40 results = []
41
42 data = loads(extr(resp.text, 'var data = ', ';\n'))
43
44 # parse results
45 for result in data['filtered']['data']:
46 result = result[result['type']]
47 videoid = result['uri'].split('/')[-1]
48 url = base_url + videoid
49 title = result['name']
50 thumbnail = result['pictures']['sizes'][-1]['link']
51 publishedDate = parser.parse(result['created_time'])
52
53 # append result
54 results.append(
55 {
56 'url': url,
57 'title': title,
58 'content': '',
59 'template': 'videos.html',
60 'publishedDate': publishedDate,
61 'iframe_src': "https://player.vimeo.com/video/" + videoid,
62 'thumbnail': thumbnail,
63 }
64 )
65
66 # return results
67 return results

Variable Documentation

◆ about

dict searx.engines.vimeo.about
Initial value:
1= {
2 "website": 'https://vimeo.com/',
3 "wikidata_id": 'Q156376',
4 "official_api_documentation": 'http://developer.vimeo.com/api',
5 "use_official_api": False,
6 "require_api_key": False,
7 "results": 'HTML',
8}

Definition at line 13 of file vimeo.py.

◆ base_url

str searx.engines.vimeo.base_url = 'https://vimeo.com/'

Definition at line 27 of file vimeo.py.

◆ categories

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

Definition at line 23 of file vimeo.py.

◆ paging

bool searx.engines.vimeo.paging = True

Definition at line 24 of file vimeo.py.

◆ search_url

str searx.engines.vimeo.search_url = base_url + 'search/page:{pageno}?{query}'

Definition at line 28 of file vimeo.py.