Jump to content
Ketarin forum

Regexp for downloading from Sourceforge


Parap
 Share

Recommended Posts

Hey ..

I'm trying to get some application of Sourceforge yeah ... with no success with my first regexp "project" :P

By searching on google I found some nice examples .. but I want to succed on my own to understand how it works. All i want to exclud is the mirrorsite of SF.

blablabla ... heres my code ;)

 

post-6601-0-20637300-1440175868_thumb.png

 

[netcologne] will be marked in Ketarin .. but it failed by downloading.

 

post-6601-0-90593000-1440175874_thumb.png

 

Thx :ph34r:

Link to comment
Share on other sites

SourceForge is a funky site. You're better off composing most of the URL yourself (see the existing Applications here, then filter for SourceForge). I know, composing the URL may not seem as elegant, but it beats dealing with individual server issues and allows you to select the specific mirror you prefer to use and bypass some unnecessary steps as well. My worksheet for SourceForge apps includes the following magic values that I tune to specific apps:

http://downloads.sourceforge.net/project/APPSLUG/APPBUILD/APPNAME{version}.exe

Replace APPSLUG, APPBUILD and the APPNAME/filename pattern with the "real" values and patterns used by the app and you're done.

 

Make sure you also use the useragent "wget" or another GUI-less UA and you don't get endlessly redirected to various mirrors.

Link to comment
Share on other sites

  • 2 weeks later...

The problem with the "latest" URL format is that it's unpredictable when there are distributions for different operating systems and bit-types. Sometimes you'll get the Windows x64 version, but you're just as likely to get a tarball intended for 32-bit Linux.

Yes, but you can describe it in useragent. :)
Link to comment
Share on other sites

The UA doesn't necessarily determine what you get, though. With IE64 you might get a tarball. With wget you might get the Windows 32-bit version. With Chrome on Windows you might get an RPM. SourceForge's "latest" feature just isn't reliable enough to depend on as a source for anything with multiple builds or variations.

Link to comment
Share on other sites

The UA doesn't necessarily determine what you get, though. With IE64 you might get a tarball. With wget you might get the Windows 32-bit version. With Chrome on Windows you might get an RPM. SourceForge's "latest" feature just isn't reliable enough to depend on as a source for anything with multiple builds or variations.

I use this:

Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
It's contains WOW64. But you're right it's can be some issues.
Link to comment
Share on other sites

  • 1 year later...

Make sure you also use the useragent "wget" or another GUI-less UA and you don't get endlessly redirected to various mirrors.

 

Thanks for this advice! I had an off again, on again relationship with Ketarin over the years, (mostly) because of sf.

​I knew it had to work somehow, but I didn't get it working till today.

I found several threads of how to do sf, but most where outdated or with broken links or missing a detail.

Then the solution is only four characters long... :huh:

 

Thanks for making Ketarin great again :-)

Thalon

 

Edit: wow, I'm getting old.. Started using Ketarin the first time over 7 years ago..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.