Created
March 4, 2011 04:50
-
-
Save hoskeri/854185 to your computer and use it in GitHub Desktop.
Script to scrape songs.pk
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 characters
| #!/usr/bin/ruby | |
| require 'nokogiri' | |
| require 'open-uri' | |
| Nokogiri::HTML(open(ARGV[0])).css("a").map do |link| | |
| link.attributes["href"].value | |
| end.find_all do |link| | |
| link.include? "song1.php?songid=" or link.include? "song.php?songid=" | |
| end.each do |link| | |
| print "#{link}\n" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment