LyricsMaster is a library for downloading lyrics from multiple lyrics providers. LyricWiki, AzLyrics, Genius, Lyrics007, MusixMatch and other lyrics provider are available
Project description
LyricsMaster
LyricsMaster is a library for downloading lyrics from multiple lyrics providers.
The following Lyrics Providers are supported:
Lyric Wikia
AzLyrics
Genius
Lyrics007
MusixMatch
The Original Hip-Hop (Rap) Lyrics Archive - OHHLA.com
and more to come soon.
Free software: MIT license
Documentation: https://lyricsmaster.readthedocs.io.
Features
Download Lyrics from LyricWiki, AzLyrics, Genius, Lyrics007, MusixMatch, OHHLA and more.
Download Lyrics Asynchronously.
Can make requests over Tor for anonymous downloading of songs.
Easily save the lyrics on your computer.
Usage
To use LyricsMaster in a project:
from lyricsmaster import LyricWiki, TorController # Select a provider from the supported Lyrics Providers (LyricWiki, AzLyrics, Genius etc..) # The default Provider is LyricWiki provider = LyricWiki() # Fetch all lyrics from 2Pac discography = provider.get_lyrics('2Pac') # Discography Objects and Album Objects can be iterated over. for album in discography: # album is an Album Object. print('Album: ', album.title) for song in album: # song is a Song Object. print('Song: ', song.title) print('Lyrics: ', song.lyrics) # New indexing and slicing support of Discography and Album Objects first_song_of_first_album = discography.albums[0].songs[0] lat_two_songs_of_first_album = discography.albums[0].songs[-2:] # Fetch all lyrics from 2pac's album 'All eyez on me'. album = provider.get_lyrics('2Pac', album='All eyes on me') # Fetch the lyrics from the song 'California Love' in 2pac's album 'All eyez on me'. song = provider.get_lyrics('2Pac', album='All eyez on me', song='California Love) # Once the lyrics are fetched, you can save them on disk. # The 'save()' method is implemented for Discography, Album and Song objects. # By default, the lyrics are saved in {user}/Documents/lyricsmaster/ discography.save() # You can also supply a folder to save the lyrics in. folder = 'c:\MyFolder' discography.save(folder) # For anonymity, you can use a Tor Proxy to make requests. # The TorController class has the same defaults as a default Tor Install. provider = LyricWiki(TorController()) discography = provider.get_lyrics('2Pac') # For enhanced anonymity, the TorController can renew the the Tor ciruit for each album dowloaded. # For this functionnality to work, the Tor ControlPort option must be enabled in your torrc config file. # See https://www.torproject.org/docs/tor-manual.html.en for more information. provider = LyricWiki(TorController(control_port=9051, password='password)) discography = provider.get_lyrics('2Pac')
To use LyricsMaster from the command line (The default Lyrics Provider is LyricWiki):
$ lyricsmaster <artist_name> options
Examples:
$ lyricsmaster "2Pac" Anonymous requests disabled. The connexion will not be anonymous. Downloading 2Pacalypse Now (1991) 2Pacalypse Now (1991) succesfully downloaded Downloading Strictly 4 My N.I.G.G.A.Z... (1993) Strictly 4 My N.I.G.G.A.Z... (1993) succesfully downloaded Downloading Thug Life - Volume 1 (1994) ... $ lyricsmaster "2Pac" --provider Genius Anonymous requests disabled. The connexion will not be anonymous. Downloading The Rose That Grew From Concrete (Book) The Rose That Grew From Concrete (Book) succesfully downloaded Downloading Best of 2Pac Part 2: Life Best of 2Pac Part 2: Life succesfully downloaded ... $ lyricsmaster "2Pac" --tor 127.0.0.1 Anonymous requests enabled. The Tor circuit will change according to the Tor network defaults. Downloading 2Pacalypse Now (1991) 2Pacalypse Now (1991) succesfully downloaded Downloading Strictly 4 My N.I.G.G.A.Z... (1993) Strictly 4 My N.I.G.G.A.Z... (1993) succesfully downloaded Downloading Thug Life - Volume 1 (1994) ... $ lyricsmaster "2Pac" --tor 127.0.0.1 --controlport 9051 --password password Anonymous requests enabled. The Tor circuit will change for each album. New Tor circuit created Downloading 2Pacalypse Now (1991) 2Pacalypse Now (1991) succesfully downloaded New Tor circuit created Downloading Strictly 4 My N.I.G.G.A.Z... (1993) Strictly 4 My N.I.G.G.A.Z... (1993) succesfully downloaded New Tor circuit created Downloading Thug Life - Volume 1 (1994) ...
History
2.8.1 (2019-04-07)
Implemented more fully the Python Data Model for the Discography and Album classes.
Now individual albums or songs in a Discography object can be individually accessed by indexing or slicing on top of previously being iterable.
For example Discography.albums[0].songs[0] or Discography.albums[0].songs[2:5]
Updated dependencies.
2.8 (2019-03-31)
Enhanced support for utf-8 characters even when the html encoding has wrong information. (see https://github.com/SekouD/lyricsmaster/issues/211)
Fixed AzLyrics bug when Artist had song but no album on the service.
Updated dependencies.
2.7.25 (2019-03-23)
Enhanced support for utf-8 characters even when the html encoding has wrong information. (see https://github.com/SekouD/lyricsmaster/issues/211)
Fixed MusixMatch bug when only the first sentence of some lyrics was parsed.
updated logger configuration to avoid repeated logs when lyricsmaster was used as a library instead of standalone.
Updated dependencies.
2.7.24 (2019-03-16)
Fixed bug when trying to download lyrics from urls containing unicode characters. (see https://github.com/SekouD/lyricsmaster/issues/211)
Replaced use of print() with Python logging facilities.
Updated dependencies.
2.7.23 (2019-02-28)
Updated lyricsmaster to reflect changes in MusixMatch and Lyrics007 APIs.
Updated dependencies.
2.7.22 (2018-11-18)
Updated dependencies.
2.7.21 (2018-11-04)
Updated to latest tor version.
Updated dependencies.
2.7.20 (2018-07-29)
Updated to latest tor version.
Updated documentation.
2.7.19 (2018-07-16)
Catch exceptions when the release date of the album is not in the title tag for all providers.
2.7.17 (2018-07-08)
Improved Tests.
Updated documentation.
2.7.16 (2017-09-27)
General improvements.
2.7.0 (2017-09-27)
Added Command Line Interface.
2.6.0 (2017-09-26)
Added Genius provider.
2.5.0 (2017-09-26)
Added python 2.7 compatibility
2.4.0 (2017-09-24)
Added AzLyrics provider.
2.3.0 (2017-09-21)
Added full documentation.
Corrected asynchronous requests bug when renewing Tor circuit.
2.2.0 (2017-09-20)
Added save method to Discography, Album, Song objects.
2.1.0 (2017-09-20)
Added Asynchronous Requests.
2.0.0 (2017-09-19)
Added Tor Anonymisation.
1.0.0 (2017-09-17)
Added LyricWiki provider.
0.1.0 (2017-09-11)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lyricsmaster-2.8.1.tar.gz
.
File metadata
- Download URL: lyricsmaster-2.8.1.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f85db623dd2b7681246b025e162c87e80ee81f285e20b733dc3bfe30214896f9 |
|
MD5 | 7fd70e5c06ce59fa2899db92c7ec5b25 |
|
BLAKE2b-256 | 755b5ddc587aeb0fb7d3c2998fdb59b1ac902d62105f3a49bcd0e51134e0f8ca |
File details
Details for the file lyricsmaster-2.8.1-py2.py3-none-any.whl
.
File metadata
- Download URL: lyricsmaster-2.8.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14dfd5d7414a3b1de5298508bc195903dcacfabf287a7a4148d55a3b5e200324 |
|
MD5 | 87b5126b2dfedb98fd8040d0dbc39022 |
|
BLAKE2b-256 | c470be4b82a3aa36f402b95f70d675d46a7ee787dd82c752f93f5c78e9a05586 |