Cleanup Code
Removed tons of instances of x.replace
This commit is contained in:
parent
f0f9594c8a
commit
c5cc81cc77
@ -5,12 +5,10 @@ def getselect(select):
|
|||||||
|
|
||||||
if len(select.split()) > 2:
|
if len(select.split()) > 2:
|
||||||
keyword = str(select.split('-'))
|
keyword = str(select.split('-'))
|
||||||
keyword = keyword.replace('[', '')
|
|
||||||
keyword = keyword.replace(']', '')
|
|
||||||
keyword = keyword.replace('\'', '')
|
|
||||||
keyword = keyword.replace(' ', '&')
|
keyword = keyword.replace(' ', '&')
|
||||||
keyword = keyword.replace('!wallpaper&', '')
|
for reform in ['[', ']', '\'', '!wallpaper&']:
|
||||||
#print(url)
|
if reform in keyword:
|
||||||
|
keyword = keyword.replace(reform,"")
|
||||||
url = "?".join((url, keyword))
|
url = "?".join((url, keyword))
|
||||||
if 'waifu' in keyword:
|
if 'waifu' in keyword:
|
||||||
url = 'https://media0.giphy.com/media/C79RKZ7nOcK8U/giphy.gif'
|
url = 'https://media0.giphy.com/media/C79RKZ7nOcK8U/giphy.gif'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user