7 "/Volumes/uploader/src/mmdbowl/#{code}.html"
11 http = Net::HTTP.new('bowlroll.net')
13 http.request_get("/up/#{code}") do |response|
14 open(src_path(code), 'wb') { |f|
15 response.read_body { |buf| f.write buf }
22 if File.exist? src_path
34 @source = IO.read(src_path)
38 !!/削除され/.match(@source)
42 !!/認証キー/.match(@source)
46 description.split(/,/)[0]
50 description.split(/,/)[1..-1]
54 %r(<meta name="description" content="(.+?)">).match(@source)[1]
58 File.extname(origname)[1..-1]
62 %r(<p>ファイル名 : (.+?)</p>).match(@source)[1]
71 header["user-agent"] = "Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)"
72 header["accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
73 header["accept-language"] = "ja,en-us;q=0.7,en;q=0.3"
74 header["accept-charset"] = "Shift_JIS,utf-8;q=0.7,*;q=0.7"
75 header["referer"] = "http://bowlroll.net/up/#{code}"
76 header["content-type"] = "multipart/form-data; boundary=#{boundary}"
82 body.concat "--#{boundary}\r\n"
83 body.concat "content-disposition: form-data; name=\"upDlBrowser\";\r\n"
85 body.concat "OTHER\r\n"
86 body.concat "--#{boundary}--\r\n"
95 "/Volumes/uploader/arc/mmdbowl/#{name}"
99 http = Net::HTTP.new('bowlroll.net')
101 request = Net::HTTP::Post.new('/Php/upDlDownload.php')
103 request_header.each do |key, value|
106 request.body = request_body
108 http.request(request) do |response|
110 p response['content-type']
111 open(arc_path, 'wb') { |f|
112 response.read_body { |buf| f.write buf }
125 if File.exist? arc_path