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

Functions

 request (query, params)
 
 response (resp)
 

Variables

dict about
 
list categories = ['images']
 
bool paging = True
 
int nb_per_page = 20
 
str search_api = 'https://api.artic.edu/api/v1/artworks/search?'
 
str image_api = 'https://www.artic.edu/iiif/2/'
 

Detailed Description

The Art Institute of Chicago

Explore thousands of artworks from The Art Institute of Chicago.

* https://artic.edu

Function Documentation

◆ request()

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

Definition at line 30 of file artic.py.

30def request(query, params):
31
32 args = urlencode(
33 {
34 'q': query,
35 'page': params['pageno'],
36 'fields': 'id,title,artist_display,medium_display,image_id,date_display,dimensions,artist_titles',
37 'limit': nb_per_page,
38 }
39 )
40 params['url'] = search_api + args
41
42 logger.debug("query_url --> %s", params['url'])
43 return params
44
45

◆ response()

searx.engines.artic.response ( resp)

Definition at line 46 of file artic.py.

46def response(resp):
47
48 results = []
49 json_data = loads(resp.text)
50
51 for result in json_data['data']:
52
53 if not result['image_id']:
54 continue
55
56 results.append(
57 {
58 'url': 'https://artic.edu/artworks/%(id)s' % result,
59 'title': result['title'] + " (%(date_display)s) // %(artist_display)s" % result,
60 'content': "%(medium_display)s // %(dimensions)s" % result,
61 'author': ', '.join(result['artist_titles']),
62 'img_src': image_api + '/%(image_id)s/full/843,/0/default.jpg' % result,
63 'template': 'images.html',
64 }
65 )
66
67 return results

Variable Documentation

◆ about

dict searx.engines.artic.about
Initial value:
1= {
2 "website": 'https://www.artic.edu',
3 "wikidata_id": 'Q239303',
4 "official_api_documentation": 'http://api.artic.edu/docs/',
5 "use_official_api": True,
6 "require_api_key": False,
7 "results": 'JSON',
8}

Definition at line 13 of file artic.py.

◆ categories

list searx.engines.artic.categories = ['images']

Definition at line 22 of file artic.py.

◆ image_api

str searx.engines.artic.image_api = 'https://www.artic.edu/iiif/2/'

Definition at line 27 of file artic.py.

◆ nb_per_page

int searx.engines.artic.nb_per_page = 20

Definition at line 24 of file artic.py.

◆ paging

bool searx.engines.artic.paging = True

Definition at line 23 of file artic.py.

◆ search_api

str searx.engines.artic.search_api = 'https://api.artic.edu/api/v1/artworks/search?'

Definition at line 26 of file artic.py.