playrip 2.2.0__tar.gz → 2.2.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: playrip
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Esse projeto é usado para abaixar musicas tanto no spotify e no Youtube
5
5
  Author: IyinG
6
6
  Author-email: 165347923+Blackgnr7@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "playrip"
3
- version = "2.2.0"
3
+ version = "2.2.2"
4
4
  description = "Esse projeto é usado para abaixar musicas tanto no spotify e no Youtube"
5
5
  authors = [
6
6
  {name = "IyinG",email = "165347923+Blackgnr7@users.noreply.github.com"}
@@ -70,16 +70,11 @@ def Spotify(url, thumbnail):
70
70
  res = requests.get(url, headers=headers)
71
71
  soup = BeautifulSoup(res.text, "html.parser")
72
72
  thumb = soup.find("meta", property="og:image")["content"]
73
- titulo = soup.title.string
74
- titulo = titulo.replace(" | Spotify", "").replace("song and lyrics by ", "")
75
- if " - " in titulo:
76
- titulo_spotify, artista = titulo.split(" - ", 1)
77
- else:
78
- titulo_spotify = titulo
79
- artista = ""
80
- if artista == "":
81
- titulo_spotify = soup.find("meta", property="og:title")["content"]
82
- artista = soup.find("meta", property="og:description")["content"].split(" · ")[0]
73
+ titulo_spotify = soup.find("meta", property="og:title")["content"]
74
+ artista = soup.find("meta", property="og:description")["content"].split(" · ")[0]
75
+ if ", " in artista:
76
+ artista = artista.split(", ")[0]
77
+ print(artista)
83
78
  Novo_titulo_spotify = (
84
79
  titulo_spotify.replace("/", "")
85
80
  .replace("|", "")
@@ -90,6 +85,8 @@ def Spotify(url, thumbnail):
90
85
  .replace(":", "")
91
86
  .replace("\\", "")
92
87
  )
88
+ if f" - Single by {artista} Spotify" in Novo_titulo_spotify:
89
+ Novo_titulo_spotify = Novo_titulo_spotify.replace(f" - Single by {artista} Spotify", "")
93
90
  print(f"titulo da musica do spotify: {titulo_spotify}\n")
94
91
  get.audio(artista=artista, titulo_da_musica=Novo_titulo_spotify, diretorio_destino=diretorio_destino)
95
92
  audiofile = eyed3.load(f"{diretorio_destino}/{Novo_titulo_spotify}.mp3")
File without changes
File without changes
File without changes
File without changes