2 # download from futabacustom mod
3 # http://www.nijibox5.com/futabacustom/mod/
5 $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
8 def each_filename(text)
10 file_re = Regexp.new(Regexp.escape(file_href) + '(.+?)\.html')
11 text.scan(/href="(.+?)"/) do |href, |
12 if md = file_re.match(href)
18 uploader = SnUploader.new
19 uploader.host = "www.nijibox5.com"
20 uploader.root_path = "/futabacustom/mod"
21 uploader.base_html = ""
22 uploader.local_dir = File.dirname(__FILE__) + '/../arc/mod'
23 body = uploader.get_base
24 each_filename(body) do |filename|
25 exist = uploader.local_file_exist?(filename)
26 puts [ filename, exist ? 'exist' : 'download' ].join("\t")
27 uploader.download_file(filename) unless exist