Skip to main content

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

PyPi Status Linux Continuous Integration Status Windows Continuous Integration Status Documentation Status Dependencies Update Status Coverage Status

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.

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)

# 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.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lyricsmaster-2.7.13.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lyricsmaster-2.7.13-py2.py3-none-any.whl (12.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file lyricsmaster-2.7.13.tar.gz.

File metadata

  • Download URL: lyricsmaster-2.7.13.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lyricsmaster-2.7.13.tar.gz
Algorithm Hash digest
SHA256 3523af0a44ddc4015c13f0508b1dd9c4bcce0dba918a6e28ff6c8e7ce80bf631
MD5 fa836f2b8565c4ef3109cd2ec8412547
BLAKE2b-256 195f473b1da897b6cbcd5776a0a1f726289b829142b708a872240d3b0e89d64f

See more details on using hashes here.

File details

Details for the file lyricsmaster-2.7.13-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for lyricsmaster-2.7.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ddb72937918f82b328913759b290463477734136c7db207813696e0ff13c299
MD5 106e9e0108e130702ac6505c9efdb978
BLAKE2b-256 6cd4c26545a2ca88fe58bf10add92371fdba5aa8492d9ead41889d07916a87a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page