mirror of
https://gitlab.com/RemixDev/deemix-py.git
synced 2025-01-01 04:36:04 +00:00
Moved clean search query outside the class
This commit is contained in:
parent
92f2687386
commit
c21e5ffe27
|
@ -494,14 +494,14 @@ class Deezer:
|
|||
return 0
|
||||
return 0
|
||||
|
||||
def clean_search_query(term):
|
||||
term = str(term)
|
||||
term = re.sub(r' feat[\.]? ', " ", term)
|
||||
term = re.sub(r' ft[\.]? ', " ", term)
|
||||
term = re.sub(r'\(feat[\.]? ', " ", term)
|
||||
term = re.sub(r'\(ft[\.]? ', " ", term)
|
||||
term = term.replace('&', " ").replace('–', "-").replace('—', "-")
|
||||
return term
|
||||
def clean_search_query(term):
|
||||
term = str(term)
|
||||
term = re.sub(r' feat[\.]? ', " ", term)
|
||||
term = re.sub(r' ft[\.]? ', " ", term)
|
||||
term = re.sub(r'\(feat[\.]? ', " ", term)
|
||||
term = re.sub(r'\(ft[\.]? ', " ", term)
|
||||
term = term.replace('&', " ").replace('–', "-").replace('—', "-")
|
||||
return term
|
||||
|
||||
class APIError(Exception):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue