Created
October 4, 2010 15:53
-
-
Save koyachi/609923 to your computer and use it in GitHub Desktop.
This file contains 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/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
module JD_EXT | |
module FixMP3TagFromSC | |
class << self | |
def jd_webui_url | |
'http://localhost:8765/' | |
end | |
def fix(path) | |
# TODO: impl | |
end | |
def filenames_from_jd_webui | |
doc = Nokogiri::HTML(open(jd_webui_url)) | |
doc.xpath('//tr[@class="downloadfinished"]/td[3][text()="soundcloud.com"]/../td[2]/a/text()') | |
end | |
def run | |
filenames_from_jd_webui.each do |filename| | |
puts filename | |
# fix(filename) | |
end | |
end | |
end | |
end | |
end | |
JD_EXT::FixMP3TagFromSC.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment