Skip to content

Commit

Permalink
Updated to return an empty list if given a link
Browse files Browse the repository at this point in the history
returning a string gave some interresting results in the output
  • Loading branch information
Nogzi committed Oct 22, 2021
1 parent 878042b commit 956b22a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions players.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def send(self, kind, message):

def search(self, query: str):
url_check = query
if re.search("([a-z]*[.])\w+", url_check) == True:
return "You cant use links"
if re.search("([a-z]*[.])\w+", url_check):
return []
results = self.dz.api.search(query)['data']
#print(results[0:9])
res_list = [
Expand Down

0 comments on commit 956b22a

Please sign in to comment.