Login Register


Lyrister - Song Lyrics Scrapper filter_list
Author
Message
Lyrister - Song Lyrics Scrapper #1
Hello Everyone,

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 here : https://github.com/AnimeshShaw/Lyrister

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

How to Use ?

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

Code:
python lyrister.py

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

Code:
python lyrister.py <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.

Code:
python lyrister.py carnival /home/psychocoder/ carnivallyric

Example 2:

Here we download the song Carnival Of Rust by "Poets Of Fall". Since we have provided the song name with space there won't be any problem.

Code:
python lyrister.py "carnival of rust" /home/psychocoder/ CarnivalOfRust

If a file with the same name exists in the directory then it won't let to 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 wont 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]
[Image: OilyCostlyEwe.gif]

[+] 1 user Likes Psycho_Coder's post
Reply

RE: Lyrister - Song Lyrics Scrapper #2
Source Code Repo link fixed.
[Image: OilyCostlyEwe.gif]

Reply

RE: Lyrister - Song Lyrics Scrapper #3
The worst thing for me was to modify the indents, as the copy paste didn't auto indent... :Laughing:
There is one more problem that request module is external??

If you are online answer me please mate I really want to try this out!
MASTERING OTHERS IS STRENGTH, MASTERING YOURSELF IS TRUE POWER.

[Image: qJweLN6.jpg]

Reply

RE: Lyrister - Song Lyrics Scrapper #4
How do I use it? Do I use python's terminal, or something like Command Prompt?

Reply

RE: Lyrister - Song Lyrics Scrapper #5
(10-01-2014, 07:47 PM)ShawnReynolds Wrote: How do I use it? Do I use python's terminal, or something like Command Prompt?

Read the first post. There is a whole section with step-by-step instruction how to use it.
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: Lyrister - Song Lyrics Scrapper #6
(10-01-2014, 08:23 PM)Deque Wrote:
(10-01-2014, 07:47 PM)ShawnReynolds Wrote: How do I use it? Do I use python's terminal, or something like Command Prompt?

Read the first post. There is a whole section with step-by-step instruction how to use it.

I did, but I do not know whether to use Python's terminal or the Command Prompt terminal, as I have never done anything with Python before.

Reply

RE: Lyrister - Song Lyrics Scrapper #7
(10-01-2014, 08:24 PM)ShawnReynolds Wrote:
(10-01-2014, 08:23 PM)Deque Wrote:
(10-01-2014, 07:47 PM)ShawnReynolds Wrote: How do I use it? Do I use python's terminal, or something like Command Prompt?

Read the first post. There is a whole section with step-by-step instruction how to use it.

I did, but I do not know whether to use Python's terminal or the Command Prompt terminal, as I have never done anything with Python before.

Either python terminal, or via cmd go to pythonXX folder type:
Code:
python.exe <path to the script location> <then what Psycho_Coder told you to type>
MASTERING OTHERS IS STRENGTH, MASTERING YOURSELF IS TRUE POWER.

[Image: qJweLN6.jpg]

Reply

RE: Lyrister - Song Lyrics Scrapper #8
Just tried it out, solved the requests module problem (install via pip suite).
This is a script that I am going to use my whole life probably!
Thanks to @Psycho_Coder and his great mind/ideas!
It works like a charm!
Cheers!
MASTERING OTHERS IS STRENGTH, MASTERING YOURSELF IS TRUE POWER.

[Image: qJweLN6.jpg]

Reply







Users browsing this thread: 1 Guest(s)