Skip to content

Commit

Permalink
Bandaid the regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Slyyxp committed Jun 20, 2022
1 parent 9eb9724 commit c885b52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rsack/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ def genie_id(url):
:param url: Genie url
:return: Album ID
"""
expression = "genie.co.kr/detail/(artistInfo|albumInfo)......([0-9]*)"
expression = r"https://genie.co.kr/detail/(artistInfo|albumInfo)......([0-9]*)"
result = match(expression, url)
# This shouldn't be needed, regex needs to be fixed.
if not result:
expression = r"https://www.genie.co.kr/detail/(artistInfo|albumInfo)......([0-9]*)"
result = match(expression, url)
if result:
return result
logger.critical("Invalid URL: {}".format(url))
Expand Down

0 comments on commit c885b52

Please sign in to comment.