remove unused variable.  import requests for correct image retrieval
This commit is contained in:
Unknown 2017-08-17 00:51:35 -05:00
parent 522609c8ef
commit 2528a62202

View File

@ -1,7 +1,6 @@
import help_methods
import requests
def get_wall(message):
unsplash_url = "https://source.unsplash.com/{}/?".format(resolution)
unsplash_url = "https://source.unsplash.com/3840x2160/?"
if len(message.split()) > 2:
search_terms = message.split()[1:]
@ -11,12 +10,15 @@ 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 url
return requests.get(url).url