Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nathom committed Mar 3, 2021
1 parent 8d67d9d commit 93f9d8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qobuz_dl/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ def create_dir(self, directory=None):

def get_url_info(self, url: str) -> Tuple[str, str]:
'''Returns the type of the url and the id.
Compatible with urls of the form:
https://www.qobuz.com/us-en/{type}/{name}/{id}
https://open.qobuz.com/{type}/{id}
https://play.qobuz.com/{type}/{id}
/us-en/{type}/-/{id}
'''

r = re.search(
r"(?:https:\/\/(?:w{3}|open|play)\.qobuz\.com)?(?:\/[a-z]{2}-[a-z]{2})"
r"?\/(album|artist|track|playlist|label)(?:\/[-\w\d]+)?\/([\w\d]+)",
Expand Down

0 comments on commit 93f9d8d

Please sign in to comment.