26 lines
847 B
Python
26 lines
847 B
Python
import help_methods
|
|
|
|
def getselect(select):
|
|
url = 'https://source.unsplash.com/3840x2160/'
|
|
|
|
if len(select.split()) > 2:
|
|
keyword = str(select.split('-'))
|
|
keyword = keyword.replace(' ', '&')
|
|
for reform in ['[', ']', '\'', '!wallpaper&']:
|
|
if reform in keyword:
|
|
keyword = keyword.replace(reform,"")
|
|
url = "?".join((url, keyword))
|
|
if 'waifu' in keyword:
|
|
url = 'https://media0.giphy.com/media/C79RKZ7nOcK8U/giphy.gif'
|
|
|
|
if len(select.split()) > 1:
|
|
keyword = select.split()[1]
|
|
#print (url)
|
|
url = "?".join((url, keyword))
|
|
if 'waifu' in keyword:
|
|
url = 'https://media0.giphy.com/media/C79RKZ7nOcK8U/giphy.gif'
|
|
if 'help' in keyword:
|
|
return help_methods.get_help_message('wallpaper')
|
|
|
|
return url
|