1 Commits

Author SHA1 Message Date
Aaron Helton
1b203ab32f Add omdb_api_key to the format call for proper request. 2017-06-06 00:09:29 -04:00

View File

@@ -88,7 +88,7 @@ def callwebservice(omdb_api_key, dvd_title, year=""):
try:
# dvd_title_info_json = urllib.request.urlopen("http://www.omdbapi.com/?t={0}&y={1}&plot=short&r=json".format(dvd_title, year)).read()
dvd_title_info_json = urllib.request.urlopen("http://www.omdbapi.com/?t={1}&y={2}&plot=short&r=json&apikey={0}".format(dvd_title, year)).read()
dvd_title_info_json = urllib.request.urlopen("http://www.omdbapi.com/?t={1}&y={2}&plot=short&r=json&apikey={0}".format(omdb_api_key, dvd_title, year)).read()
except:
return "fail"
else:
@@ -103,4 +103,4 @@ def callwebservice(omdb_api_key, dvd_title, year=""):
args = entry()
dvd_type = getdvdtype()
print(dvd_type)
print(dvd_type)