Jump to content


Photo

Regexp for downloading from Sourceforge


8 replies to this topic

#1 Parap

Parap
  • Members
  • 2 posts

Posted 21 August 2015 - 04:53 PM

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 ;)

 

RegExp1.png

 

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

 

RegExp2.png

 

Thx :ph34r:



#2 shawn

shawn
  • Moderators
  • 800 posts

Posted 21 August 2015 - 05:17 PM

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.



#3 UksusoFF

UksusoFF
  • Members
  • 111 posts
  • LocationSamara, RU

Posted 03 September 2015 - 11:41 AM

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

It's strange but i'm use this link a long time ago:
http://sourceforge.net/projects/APPSLUG/files/latest
And it's works great in latest Ketarin without changing user agent.

Look at this:
w53pnco.jpg
Sorry for my English =(

#4 shawn

shawn
  • Moderators
  • 800 posts

Posted 08 September 2015 - 07:30 PM

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.



#5 UksusoFF

UksusoFF
  • Members
  • 111 posts
  • LocationSamara, RU

Posted 08 September 2015 - 07:34 PM

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. :)
Sorry for my English =(

#6 shawn

shawn
  • Moderators
  • 800 posts

Posted 09 September 2015 - 07:35 AM

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.



#7 UksusoFF

UksusoFF
  • Members
  • 111 posts
  • LocationSamara, RU

Posted 09 September 2015 - 06:43 PM

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.
Sorry for my English =(

#8 Thalon

Thalon
  • Members
  • 3 posts

Posted 11 December 2016 - 04:24 PM

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..



#9 shawn

shawn
  • Moderators
  • 800 posts

Posted 12 December 2016 - 06:00 AM

welcome back. next time post your problem and we'll try to get you sorted inside the same decade. :)





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users