-
-
Save flawiddsouza/d9f24d2061ac6b3a7f76f30f0c063e86 to your computer and use it in GitHub Desktop.
Revisions
-
flawiddsouza revised this gist
May 9, 2016 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ url = "http://www.azlyrics.com/lyrics/" url << artist.downcase url << "/" url << song.downcase.gsub("'", '') # gsub to remove single quotes from song title url << ".html" puts url @@ -23,8 +23,8 @@ fin = page_content.index('<br><br>') debut = debut + 133 fin = fin - 11 lyrics = page_content[debut..fin] lyrics = lyrics.gsub "<br>", " " puts lyrics -
flawiddsouza revised this gist
May 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ debut = page_content.index('<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->') fin = page_content.index('<br><br>') debut = debut + 133 fin = fin - 1 lyrics = page_content[debut..fin] -
flawiddsouza revised this gist
May 9, 2016 . 1 changed file with 6 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,11 @@ # from https://gist.github.com/Sidysky/11354662 require 'open-uri' puts "Artist:" artist = $stdin.gets.chomp artist = artist.delete " " puts "Song Name:" song = $stdin.gets.chomp song = song.delete " " @@ -24,8 +19,8 @@ page_content = open(url).read debut = page_content.index('<!-- Usage of azlyrics.com content by any third-party lyrics provider is prohibited by our licensing agreement. Sorry about that. -->') fin = page_content.index('<br><br>') debut = debut + 24 fin = fin - 1 -
olimagsax revised this gist
May 20, 2014 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,13 +3,14 @@ require 'open-uri' require 'colorize.rb' puts "Artiste :".blue artist = $stdin.gets.chomp artist = artist.delete " " puts "Chanson :".blue song = $stdin.gets.chomp song = song.delete " " -
olimagsax revised this gist
Apr 29, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ #This is a little script for fetching lyrics :D #LyricsFetch by Sidysky require 'open-uri' -
olimagsax renamed this gist
Apr 27, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
olimagsax revised this gist
Apr 27, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #This is a little script for fetching lyrics :D require 'open-uri' -
olimagsax created this gist
Apr 27, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ require 'open-uri' puts "Artiste :" artist = $stdin.gets.chomp artist = artist.delete " " puts "Chanson :" song = $stdin.gets.chomp song = song.delete " " url = "http://www.azlyrics.com/lyrics/" url << artist.downcase url << "/" url << song.downcase url << ".html" puts url page_content = open(url).read debut = page_content.index('<!-- start of lyrics -->') fin = page_content.index('<!-- end of lyrics -->') debut = debut + 24 fin = fin - 1 lyrics = page_content[debut..fin] lyrics = lyrics.gsub "<br />", " " puts lyrics