moar bugfix
correct indent for response, adds response for parse incorrect tag url
This commit is contained in:
parent
2528a62202
commit
2dadf6ee56
@ -10,15 +10,17 @@ def get_wall(message):
|
||||
|
||||
# Add those comma separated strings onto the end of the URL variable
|
||||
url = unsplash_url + joined_terms
|
||||
print(url)
|
||||
|
||||
elif len(message.split()) > 1:
|
||||
term = message.split()[1]
|
||||
url = unsplash_url + term
|
||||
print(url)
|
||||
|
||||
else:
|
||||
url = unsplash_url
|
||||
print(url)
|
||||
|
||||
return requests.get(url).url
|
||||
response = requests.get(url).url
|
||||
|
||||
if 'photo-1446704477871-62a4972035cd' in response:
|
||||
return "Could not find and image for those tags."
|
||||
else:
|
||||
return response
|
||||
|
Loading…
x
Reference in New Issue
Block a user