def findAllSongs(artist, arg='songs'): tracks = [] links = [] newUrl = pagination.openPage(artist) songs = pagination.getSongs(newUrl) for song in songs: link = song[0] track = song[1] links.append(link) tracks.append(track) if arg == 'links': return links elif arg == 'titles': return tracks else: return songs
def findAllSongs(artist): newUrl = pagination.openPage(artist) songs = pagination.getSongs(newUrl) return songs