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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
str base_url = "https://api.bitchute.com/api/beta/search/videos"
 
list categories = ['videos']
 
bool paging = True
 
int results_per_page = 20
 

Detailed Description

bitchute (Videos)

Function Documentation

◆ request()

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

Definition at line 23 of file bitchute.py.

23def request(query, params):
24
25 start_index = (params["pageno"] - 1) * results_per_page
26 data = {"offset": start_index, "limit": results_per_page, "query": query, "sensitivity_id": "normal", "sort": "new"}
27 params["url"] = base_url
28 params["method"] = 'POST'
29 params['headers']['content-type'] = "application/json"
30 params['data'] = dumps(data)
31
32 return params
33
34

◆ response()

searx.engines.bitchute.response ( resp)

Definition at line 35 of file bitchute.py.

35def response(resp):
36 search_res = resp.json()
37 results = []
38
39 for item in search_res.get('videos', []):
40
41 results.append(
42 {
43 "title": item['video_name'],
44 "url": 'https://www.bitchute.com/video/' + item['video_id'],
45 "content": html_to_text(item['description']),
46 "author": item['channel']['channel_name'],
47 "publishedDate": datetime.strptime(item["date_published"], "%Y-%m-%dT%H:%M:%S.%fZ"),
48 "length": item['duration'],
49 "views": item['view_count'],
50 "thumbnail": item['thumbnail_url'],
51 "iframe_src": 'https://www.bitchute.com/embed/' + item['video_id'],
52 "template": "videos.html",
53 }
54 )
55
56 return results

Variable Documentation

◆ about

dict searx.engines.bitchute.about
Initial value:
1= {
2 "website": 'https://bitchute.com',
3 "wikidata_id": "Q45287179",
4 "official_api_documentation": None,
5 "use_official_api": False,
6 "require_api_key": False,
7 "results": "JSON",
8}

Definition at line 8 of file bitchute.py.

◆ base_url

str searx.engines.bitchute.base_url = "https://api.bitchute.com/api/beta/search/videos"

Definition at line 17 of file bitchute.py.

◆ categories

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

Definition at line 18 of file bitchute.py.

◆ paging

bool searx.engines.bitchute.paging = True

Definition at line 19 of file bitchute.py.

◆ results_per_page

int searx.engines.bitchute.results_per_page = 20

Definition at line 20 of file bitchute.py.