def all_songs(self): if self.cached_all_songs is None: logger.info(f'Retrieving all songs by: {self.name}') api = AZlyrics() api.artist = self.name all_songs = api.getSongs() logger.info(f'Retrieved {len(all_songs)} songs') self.cached_all_songs = [ Song.entitled(songs.model.SongTitle(self.name, song)) for song in all_songs.keys() ] return self.cached_all_songs
def text(self): logger.info(f'Retrieving lyrics: {self.title}') api = AZlyrics() api.artist = self.title.artist api.title = self.title.title api.getLyrics() return api.lyrics
def get_lyric(singer, song): API = AZlyrics('google', accuracy=0.5) API.artist = singer API.title = song API.getLyrics() return API.lyrics
from azapi import AZlyrics api = AZlyrics() # We are Searching for Meghan's song "All about that bass" songs = api.search('about the bass', category = 'songs') # Song appears to be the first in search results song_url = songs[0]['url'] Lyrics = api.getLyrics(url = song_url) print(Lyrics)
'of lyrics?') print('1. Google') print('2. DuckDuckGo') az_se = input(': ') print() while not az_se in ['1', '2']: print('Please specify the search engine.') print('Or type "q" to exit.') az_se = input(': ') print() if az_se == 'q': sys.exit() if az_se == '1': az_api = AZlyrics('google') if az_se == '2': az_api = AZlyrics('duckduckgo') print('You can either get the song with the song title and artist ' 'name, or you can search via lyrics.') print() print('If you don\'t remember the name of the artist, you can ' 'search by title only.') print('If you want to search by lyrics, put the lyrics in the ' 'title field') artist_name = input('Type in the name of the artist: ') song_title = input('Type in the title of the song: ') az_api.artist = artist_name
from azapi import AZlyrics api = AZlyrics('google') # We are Searching for Meghan's song "All about that bass" api.title = 'about that bass' Lyrics = api.getLyrics() print(Lyrics)
from azapi import AZlyrics api = AZlyrics() api.artist = 'Taylor Swift' songs = api.getSongs() for song in songs: api.getLyrics(url=songs[song]["url"])
from azapi import AZlyrics # Names should be passed corrrectly # If you can't remember, use google or duckduckgo # AZlyrics('google') api = AZlyrics() api.artist = 'Taylor Swift' api.title = 'Blank Space' api.getLyrics(save=True)
from azapi import AZlyrics api = AZlyrics('duckduckgo') # Mis-typing "Meghan Trainor" and "All about the bass" api.artist = 'Mehgan trenor' api.title = 'about this bass' # Using search to get correct artist and title Lyrics = api.getLyrics() print(Lyrics)
from azapi import AZlyrics import pprint api = AZlyrics() songs = api.getSongs('Ed Sheeran') pprint.pprint(songs, indent=5)
from azapi import AZlyrics api = AZlyrics() api.getLyrics(artist='kendrick lamar', title='humble')
from azapi import AZlyrics api = AZlyrics('google') # Kanye is in the format of "West" in AZLyrics database # Here we search for his name to fetch the correct url api.artist = 'Kanye west' songs = api.getSongs() for song in songs: print(song, songs[song]['year'])
from azapi import AZlyrics api = AZlyrics('duckduckgo') api.artist = 'Taylor Swift' api.title = 'Blank Space' api.getLyrics(path='C:\\Music\\Lyrics')
token = util.prompt_for_user_token(username, scope) #spotify spotifyObject spotifyObject = spotipy.Spotify(auth=token) # print(json.dumps(VARIABLE, sort_keys=True, indent=4)) while True: track = spotifyObject.current_user_playing_track() artist = track['item']['artists'][0]['name'] track = track['item']['name'] #print(track) #print(artist) if artist != "": print("Currently playing " + artist + " - " + track + "\n") #Seacrching song on az Lyrics api = AZlyrics() #n = input("Enter song name:") #i = input("Enter artist name:") z = api.getLyrics(artist='%s' % artist, title='%s' % track) print(z) #print(type(z)) """ext = 'txt' with open('{} - {}.{}'.format(track, artist, ext), 'r', encoding='utf-8') as l: l.seek(0) p = l.read()""" time.sleep(10)
audio = r.record(source) # read the entire audio file # recognize speech using Sphinx try: print(r.recognize_sphinx(audio)) except sr.UnknownValueError: print("Sphinx could not understand audio") except sr.RequestError as e: print("Sphinx error; {0}".format(e)) # Create MP3File instance. mp3 = MP3File(src) # Get all tags. rawSong = mp3.song[0] api = AZlyrics() songstr = str(rawSong.value) songs = api.search(songstr[0: len(songstr) - 1], category = 'songs') # Song appears to be the first in search results song_url = songs[0]['url'] Lyrics = api.getLyrics(url = song_url)
from azapi import AZlyrics api = AZlyrics() # Using search to get correct artist and title Lyrics = api.getLyrics(artist='meghan', title='bass', search=True) print(Lyrics)
from azapi import AZlyrics api = AZlyrics('Taylor Swift') songs = api.getSongs() for song in songs: api.getLyrics(url=songs[song]["url"])
from azapi import AZlyrics api = AZlyrics() # Kanye is in the format of "West" in AZLyrics database # Here we search for his name to fetch the correct url songs = api.getSongs('Kanye', True) print(songs)
from azapi import AZlyrics import pprint api = AZlyrics() api.artist = 'Ed Sheeran' songs = api.getSongs() pprint.pprint(songs, indent=5)