From b2c8335badd1efd9be856263b739f3429cff54de Mon Sep 17 00:00:00 2001 From: zuckerberg <5-zuckerberg@users.noreply.git.neet.dev> Date: Sun, 22 Aug 2021 22:29:00 -0400 Subject: [PATCH] move fetching artwork list into art func for now --- art.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/art.py b/art.py index 6b4b865..0b97696 100644 --- a/art.py +++ b/art.py @@ -4,11 +4,11 @@ import re 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): + # get the list of artwork + r = requests.get(host + 'objects') + objects = r.json()['objectIDs'] + searchObjects = objects if term: query = {'q': term, 'hasImages': 'true'}