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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
list categories = ['music']
 
bool paging = True
 
str url = 'https://api.mixcloud.com/'
 
str search_url = url + 'search/?{query}&type=cloudcast&limit=10&offset={offset}'
 
str iframe_src = "https://www.mixcloud.com/widget/iframe/?feed={url}"
 

Detailed Description

Mixcloud (Music)

Function Documentation

◆ request()

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

Definition at line 29 of file mixcloud.py.

29def request(query, params):
30 offset = (params['pageno'] - 1) * 10
31 params['url'] = search_url.format(query=urlencode({'q': query}), offset=offset)
32 return params
33
34

◆ response()

searx.engines.mixcloud.response ( resp)

Definition at line 35 of file mixcloud.py.

35def response(resp):
36 results = []
37 search_res = resp.json()
38
39 for result in search_res.get('data', []):
40
41 r_url = result['url']
42 publishedDate = parser.parse(result['created_time'])
43 res = {
44 'url': r_url,
45 'title': result['name'],
46 'iframe_src': iframe_src.format(url=r_url),
47 'thumbnail': result['pictures']['medium'],
48 'publishedDate': publishedDate,
49 'content': result['user']['name'],
50 }
51 results.append(res)
52
53 return results

Variable Documentation

◆ about

dict searx.engines.mixcloud.about
Initial value:
1= {
2 "website": 'https://www.mixcloud.com/',
3 "wikidata_id": 'Q6883832',
4 "official_api_documentation": 'http://www.mixcloud.com/developers/',
5 "use_official_api": True,
6 "require_api_key": False,
7 "results": 'JSON',
8}

Definition at line 10 of file mixcloud.py.

◆ categories

list searx.engines.mixcloud.categories = ['music']

Definition at line 20 of file mixcloud.py.

◆ iframe_src

str searx.engines.mixcloud.iframe_src = "https://www.mixcloud.com/widget/iframe/?feed={url}"

Definition at line 26 of file mixcloud.py.

◆ paging

bool searx.engines.mixcloud.paging = True

Definition at line 21 of file mixcloud.py.

◆ search_url

str searx.engines.mixcloud.search_url = url + 'search/?{query}&type=cloudcast&limit=10&offset={offset}'

Definition at line 25 of file mixcloud.py.

◆ url

str searx.engines.mixcloud.url = 'https://api.mixcloud.com/'

Definition at line 24 of file mixcloud.py.