Instead of -O you want to use
--remote-name-all
otherwise you have to specify -O for every URL specified. For the same reason, remove $1 and rely on all parameters being added at the end of line. The example above will only download the first URL.(I personally think this should have been the default from the beginning, -O should have set the behaviour for all following parameters until changed, but that is too late to change now.)
There is also --remote-header-name (-J) which takes the remote file name from the header instead of the URL, which is what wget does.