Click here to Skip to main content
12,755,775 members (39,148 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 18 May 2014

Lyrister - Song Lyrics Scrapper

, 18 May 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Song Lyrics scrapper in python using BeautifulSoup


Today, I will share a little snippet I wrote to get scrap or download lyrics of your favorite songs and save on your harddrive as .txt files.

I have used Python 2.7.4 for this and have used the BeautifulSoup python package for web requests.

You can get the code at

I hope I have taken care of most things that may cause you problems.


In order to successfully run and execute this app, you must have installed BeautifulSoup package, else it won't run. Please read the README on github repository about how to install them.

How to Use?

On the terminal, run the following and follow the instructions that follow:



You have the option of giving command line arguments as the parameters. The following format is to be followed:


python <name-of-song> <path-of-directory> <filename>

It takes three parameters. The first parameter is the name of the song for which you want to download the lyrics. Please note that if you intend to write the song name with spaces, then use double quotes and your directory path must end with separator.

Example 1

Here we download the song Carnival by Natalie Merchant. Since we have not provided the song name with space, there is no problem.


python carnival /home/psychocoder/ carnivallyric

Example 2

Here we download the song Carnival Of Rust by "Poets Of Fall". Since we have not provided the song name with space, there is no problem.


python "carnival of rust" /home/psychocoder/ CarnivalOfRust

If a file with the same name exists in the directory, then it won't let you save the song and will ask you to try another name to download the lyric.

If you want to save the file in some directory which doesn't have write permission, then you won't be able to save the lyrics.

These checking have been done already and I hope the rest you can understand by yourself. I have given a good description for every step in the code itself and also how to resolve the errors. I hope you enjoy.

[Image: gkHR8qU.png?1]


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

India India
My name is Animesh Shaw, Currently I am pursuing B. Tech in Computer Science. My Screen name is Psycho_Coder. I am active in many Security or Ethical Hacking forums. I love programming and exploring the depths of Computer Science.

Programming Languages know : C, C++,Java, Python and PHP.

You can even contact me on the following :-

1, CS - Computer Science Lovers : Please like it.

2. CS(Computer Science) Lovers :
My facebook group to discuss programming. You can join this group if you are serious about computer science and programming.

3. You can mail me at

My Interests :

I have great interests in the following topics in Computer Science :-

1. Programming Language Concepts and Methodologies.
2. Computational Linguistics.
3. Cryptography.

Github Profile :

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 18 May 2014
Article Copyright 2014 by Psycho_Coder
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid