wget is great for resuming downloads, something that no browser handles correctly. It has a very handy option, --load-cookie-file, which takes a cookies.txt style file from your browser and correctly serves it to the web server you’re connecting to. This is useful so you can download files where you have to log in first.
But of course, Safari doesn’t use the cookies.txt file format. Fortunately, Ruby and the plist gem come to the rescue.
$ sudo gem install plist
$ irb
>> require 'plist'
>> result = Plist::parse_xml("Library/Cookies/Cookies.plist")
>> File.open("cookies.txt", "w") {|f| result.each {|r| f.write("#{r["Domain"]}\tTRUE\t#{r["Path"]}\tFALSE\t#{r["Expires"].strftime("%s")}\t#{r["Name"]}\t#{r["Value"]}\n")}}