yutipy 2.3.1__tar.gz → 2.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of yutipy might be problematic. Click here for more details.

Files changed (64) hide show
  1. {yutipy-2.3.1 → yutipy-2.3.2}/PKG-INFO +1 -1
  2. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/utils/helpers.py +10 -9
  3. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/PKG-INFO +1 -1
  4. {yutipy-2.3.1 → yutipy-2.3.2}/.gitattributes +0 -0
  5. {yutipy-2.3.1 → yutipy-2.3.2}/.github/FUNDING.yml +0 -0
  6. {yutipy-2.3.1 → yutipy-2.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  7. {yutipy-2.3.1 → yutipy-2.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  8. {yutipy-2.3.1 → yutipy-2.3.2}/.github/dependabot.yml +0 -0
  9. {yutipy-2.3.1 → yutipy-2.3.2}/.github/workflows/pytest-unit-testing.yml +0 -0
  10. {yutipy-2.3.1 → yutipy-2.3.2}/.github/workflows/release.yml +0 -0
  11. {yutipy-2.3.1 → yutipy-2.3.2}/.gitignore +0 -0
  12. {yutipy-2.3.1 → yutipy-2.3.2}/.readthedocs.yaml +0 -0
  13. {yutipy-2.3.1 → yutipy-2.3.2}/LICENSE +0 -0
  14. {yutipy-2.3.1 → yutipy-2.3.2}/MANIFEST.in +0 -0
  15. {yutipy-2.3.1 → yutipy-2.3.2}/README.md +0 -0
  16. {yutipy-2.3.1 → yutipy-2.3.2}/docs/Makefile +0 -0
  17. {yutipy-2.3.1 → yutipy-2.3.2}/docs/_static/yutipy_header.png +0 -0
  18. {yutipy-2.3.1 → yutipy-2.3.2}/docs/_static/yutipy_logo.png +0 -0
  19. {yutipy-2.3.1 → yutipy-2.3.2}/docs/api_reference.rst +0 -0
  20. {yutipy-2.3.1 → yutipy-2.3.2}/docs/available_platforms.rst +0 -0
  21. {yutipy-2.3.1 → yutipy-2.3.2}/docs/cli.rst +0 -0
  22. {yutipy-2.3.1 → yutipy-2.3.2}/docs/conf.py +0 -0
  23. {yutipy-2.3.1 → yutipy-2.3.2}/docs/faq.rst +0 -0
  24. {yutipy-2.3.1 → yutipy-2.3.2}/docs/index.rst +0 -0
  25. {yutipy-2.3.1 → yutipy-2.3.2}/docs/installation.rst +0 -0
  26. {yutipy-2.3.1 → yutipy-2.3.2}/docs/make.bat +0 -0
  27. {yutipy-2.3.1 → yutipy-2.3.2}/docs/requirements.txt +0 -0
  28. {yutipy-2.3.1 → yutipy-2.3.2}/docs/usage_examples.rst +0 -0
  29. {yutipy-2.3.1 → yutipy-2.3.2}/pyproject.toml +0 -0
  30. {yutipy-2.3.1 → yutipy-2.3.2}/requirements-dev.txt +0 -0
  31. {yutipy-2.3.1 → yutipy-2.3.2}/requirements.txt +0 -0
  32. {yutipy-2.3.1 → yutipy-2.3.2}/setup.cfg +0 -0
  33. {yutipy-2.3.1 → yutipy-2.3.2}/tests/__init__.py +0 -0
  34. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_deezer.py +0 -0
  35. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_itunes.py +0 -0
  36. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_kkbox.py +0 -0
  37. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_lastfm.py +0 -0
  38. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_lrclib.py +0 -0
  39. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_models.py +0 -0
  40. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_musicyt.py +0 -0
  41. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_spotify.py +0 -0
  42. {yutipy-2.3.1 → yutipy-2.3.2}/tests/test_utils.py +0 -0
  43. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/__init__.py +0 -0
  44. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/base_clients.py +0 -0
  45. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/cli/__init__.py +0 -0
  46. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/cli/config.py +0 -0
  47. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/cli/search.py +0 -0
  48. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/deezer.py +0 -0
  49. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/exceptions.py +0 -0
  50. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/itunes.py +0 -0
  51. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/kkbox.py +0 -0
  52. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/lastfm.py +0 -0
  53. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/logger.py +0 -0
  54. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/lrclib.py +0 -0
  55. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/models.py +0 -0
  56. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/musicyt.py +0 -0
  57. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/spotify.py +0 -0
  58. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/utils/__init__.py +0 -0
  59. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy/yutipy_music.py +0 -0
  60. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/SOURCES.txt +0 -0
  61. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/dependency_links.txt +0 -0
  62. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/entry_points.txt +0 -0
  63. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/requires.txt +0 -0
  64. {yutipy-2.3.1 → yutipy-2.3.2}/yutipy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yutipy
3
- Version: 2.3.1
3
+ Version: 2.3.2
4
4
  Summary: A simple Python package to interact with various music platforms APIs.
5
5
  Author: Cheap Nightbot
6
6
  Author-email: Cheap Nightbot <hi@cheapnightbot.slmail.me>
@@ -1,3 +1,5 @@
1
+ import re
2
+
1
3
  import pykakasi
2
4
  import requests
3
5
  from rapidfuzz import fuzz
@@ -174,23 +176,22 @@ def separate_artists(artists: str, custom_separator: str = None) -> list[str]:
174
176
  Separate artist names of a song or album into a list.
175
177
 
176
178
  Args:
177
- artists (str): Artists string (e.g., artistA & artistB, artistA ft. artistB).
179
+ artists (str): Artists string (e.g., artistA & artistB, artistA ft. ArtistB).
178
180
  custom_separator (str, optional): A specific separator to use. Defaults to None.
179
181
 
180
182
  Returns:
181
183
  list[str]: List of individual artists.
182
184
  """
183
- default_separators = [";", "/", "ft.", "ft", "feat", "feat.", "with", "&", "and"]
184
-
185
185
  if custom_separator:
186
- separators = [custom_separator]
186
+ pattern = re.escape(custom_separator)
187
187
  else:
188
- separators = default_separators
189
-
190
- for sep in separators:
191
- artists = artists.replace(sep, ",")
188
+ pattern = r"\s*(?:ft\.?|feat\.?|with|and|[;/&])\s*"
192
189
 
193
- return [artist.strip() for artist in artists.split(",") if artist.strip()]
190
+ return [
191
+ artist.strip()
192
+ for artist in re.split(pattern, artists, flags=re.IGNORECASE)
193
+ if artist.strip()
194
+ ]
194
195
 
195
196
 
196
197
  def is_valid_string(string: str) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yutipy
3
- Version: 2.3.1
3
+ Version: 2.3.2
4
4
  Summary: A simple Python package to interact with various music platforms APIs.
5
5
  Author: Cheap Nightbot
6
6
  Author-email: Cheap Nightbot <hi@cheapnightbot.slmail.me>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes