Returns the list of unique words that comprise song and artist titles
(self)
| 315 | return |
| 316 | |
| 317 | def get_soup(self): |
| 318 | """ |
| 319 | Returns the list of unique words that comprise song and artist titles |
| 320 | """ |
| 321 | |
| 322 | soup = [] |
| 323 | |
| 324 | for song in self.songs: |
| 325 | song_words = song.title.split(" ") |
| 326 | artist_words = song.artist.split(" ") |
| 327 | soup.extend(song_words) |
| 328 | soup.extend(artist_words) |
| 329 | |
| 330 | title_trans = ''.join(chr(c) if chr(c).isupper() or chr(c).islower() |
| 331 | else '_' for c in range(256)) |
| 332 | soup = [x.decode('utf-8').encode("ascii", "ignore").upper().translate( |
| 333 | title_trans).replace("_", "") for x in soup] |
| 334 | soup = [x for x in soup if x != ""] |
| 335 | |
| 336 | return list(set(soup)) |
| 337 | |
| 338 | def get_soup_playlist(self): |
| 339 | """ |