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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
list categories = []
 
str base_url = "https://podcastindex.org"
 

Detailed Description

Podcast Index

Function Documentation

◆ request()

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

Definition at line 20 of file podcastindex.py.

20def request(query, params):
21 params['url'] = f"{base_url}/api/search/byterm?q={quote_plus(query)}"
22 return params
23
24

◆ response()

searx.engines.podcastindex.response ( resp)

Definition at line 25 of file podcastindex.py.

25def response(resp):
26 results = []
27
28 json = resp.json()
29
30 for result in json['feeds']:
31 results.append(
32 {
33 'url': result['link'],
34 'title': result['title'],
35 'content': result['description'],
36 'thumbnail': result['image'],
37 'publishedDate': datetime.utcfromtimestamp(result['newestItemPubdate']),
38 'metadata': f"{result['author']}, {result['episodeCount']} episodes",
39 }
40 )
41
42 return results

Variable Documentation

◆ about

dict searx.engines.podcastindex.about
Initial value:
1= {
2 'website': 'https://podcastindex.org',
3 'official_api_documentation': None, # requires an account
4 'use_official_api': False,
5 'require_api_key': False,
6 'results': 'JSON',
7}

Definition at line 8 of file podcastindex.py.

◆ base_url

str searx.engines.podcastindex.base_url = "https://podcastindex.org"

Definition at line 17 of file podcastindex.py.

◆ categories

list searx.engines.podcastindex.categories = []

Definition at line 15 of file podcastindex.py.