move fetching artwork list into art func for now
This commit is contained in:
parent
65c8994600
commit
b2c8335bad
8
art.py
8
art.py
@ -4,11 +4,11 @@ import re
|
|||||||
|
|
||||||
host = "https://collectionapi.metmuseum.org/public/collection/v1/"
|
host = "https://collectionapi.metmuseum.org/public/collection/v1/"
|
||||||
|
|
||||||
# get the list of artwork
|
|
||||||
r = requests.get(host + 'objects')
|
|
||||||
objects = r.json()['objectIDs']
|
|
||||||
|
|
||||||
def getArt(term):
|
def getArt(term):
|
||||||
|
# get the list of artwork
|
||||||
|
r = requests.get(host + 'objects')
|
||||||
|
objects = r.json()['objectIDs']
|
||||||
|
|
||||||
searchObjects = objects
|
searchObjects = objects
|
||||||
if term:
|
if term:
|
||||||
query = {'q': term, 'hasImages': 'true'}
|
query = {'q': term, 'hasImages': 'true'}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user