A
Andrew Walrond
I wonder if any http experts out there can save me some time...
I currently download files using http with...
def http(server,dir,file)
repeat(server,dir,file) { |localFile|
http = Net::HTTP.new(server)
File.open(localFile,"w") { |dest| http.get(path(dir,file),nil,dest) }
}
end
...which works great for simple links, but fails miserably with more complicated stuff; eg sourceforge.
Anybody got a small bit of code that will handle more complicated stuff?
I could work it out, but my head is already too full and I've avoided touching html so far...
TIA Andrew
I currently download files using http with...
def http(server,dir,file)
repeat(server,dir,file) { |localFile|
http = Net::HTTP.new(server)
File.open(localFile,"w") { |dest| http.get(path(dir,file),nil,dest) }
}
end
...which works great for simple links, but fails miserably with more complicated stuff; eg sourceforge.
Anybody got a small bit of code that will handle more complicated stuff?
I could work it out, but my head is already too full and I've avoided touching html so far...
TIA Andrew