4

我有一个使用平台特定库的 Java 项目。它们非常大,但我可以在安装程序中找出我需要哪些并下载它们。我想从 Sourceforge(我的项目的其余部分所在的位置)下载它们。

有没有办法从 SF 自动下载?

如何确保下载使用最佳镜像?

4

2 回答 2

4

If you append ?use_mirror=autoselect to the path of your download (beginning with http://downloads.sourceforge.net/project/), SourceForge will send a 302 Found response to redirect you to your closest mirror. For example:

http://downloads.sourceforge.net/project/getgnuwin32/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe?use_mirror=autoselect

Redirects to the following location for me:

http://superb-sea2.dl.sourceforge.net/project/getgnuwin32/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe

In terms of downloading the latest version, you can parse the RSS feed for the project's files.

于 2010-02-24T14:49:06.137 回答
0

您可以获取下载页面(例如http://sourceforge.net/projects/cpptest/files/cpptest/cpptest-1.1.0/cpptest-1.1.0.zip/downloadPlease use this <a href="http://downloads.sourceforge.net/project/.../...?use_mirror=..." class="direct-download">direct link</a> )并使用正则表达式进行扫描。然后你就可以为你挑选一面镜子了。

于 2010-02-24T14:44:38.940 回答