Jump to content
Ketarin forum

Getting only latest "stable" version number from filehippo?[SOLVED]


Tomorrow
 Share

Recommended Posts

So the problem is that they have a section called:

 

Latest Version

ProgramName Version

 

I can set the start and end and it correctly gets the version from there.

Problem occurs when i always download only stable version of that program from filehippo(avoid beta).

I that case the downloaded file is given a beta version number because filehippo has changed the content between my start/end tags.

 

Specificly there are 2 programs where this happens for me:

uTorrent: http://www.filehippo.com/download_utorrent/

Flash Non-IE: http://www.filehippo.com/download_flashplayer_firefox/

 

Im thinking maybe uTorrent can be done with regex because the stable builds are marked as:

uTorrent x.x.x Build xxxxx while beta builds are:

uTorrent x.x.x Beta xxxxx

 

So maybe find first occurence of the word "Build" from website and then include 6 characters in front of it,the word "Build" itself and 6 characters from end.

 

With flash it could be similar albeit more difficult because the number of numbers in version number does not seem consistant between versions.Stable versions are:

Flash Player xx.x.xx.xx (Non-IE) while beta/RC versions are:

Flash Player xx.x.xxx.xx Beta (Non-IE) or Flash Player xx.x.xxx.xx RC 1 (Non-IE)

 

Still i don't know how to go about finding the stable version number based on these.

 

If anyone has any ideas i would be grateful.

For utorrent i currently use this forum topic to get the version number: http://forum.utorrent.com/viewtopic.php?id=82840

However this falls out of sync when 2.0.5 comes and i have to do a manual change again.

Edited by Tomorrow
Link to comment
Share on other sites

Yes indeed... a template could be developed rather easily I believe to do exactly what you are describing. I'll do some experimenting this week as time permits. The best option would be if Flo could address this issue in Ketarin's code though.

 

Addendum: A QUICK FIX would be to make sure you have them both set to AVOID beta versions and capture the stable version's {version} variable using these regex strings:

 

(?<=Old\sVersions.*?uTorrent\s)(\d+[\.\d+]+?\sBuild\s\d+)(?=\<)

 

(?<=Old\sVersions.*?Flash\sPlayer\s)(\d+[\.\d+]+?)(?=\s\(Non-IE\))

 

I think you will have to delete the latest downloads that are betas and try to see if this is a solution.

Link to comment
Share on other sites

Mine were left over from early last year Flo before we decided on the version regex for Ketarin code, just haven't bothered to edit them and had forgotten that it compensates for the avoid vs. download always selection. As a result, all Tomorrow will have to do is delete the start/end selection and the erroneously versioned download and all should be well... eeh?

Link to comment
Share on other sites

I think you will have to delete the latest downloads that are betas and try to see if this is a solution.

No the downloads are just fine and i always get latest stable version downloded for these two apps.Even when hovering over the downloaded file the windows tooltip shows that it's the stable version.Yet due to the issue mentioned at the top it simply has a Beta version number.

I'm currently wondering...you are both using some start end tags and the FileHippo feature? Why?

Maybe you misunderstand?.The download is fine.I use the start/end thing in Variables {version} to capture the latest version number and give it to the saved file.

As a result, all Tomorrow will have to do is delete the start/end selection and the erroneously versioned download and all should be well... eeh?

I need to switch from regular start/end to regex to test these.I recon adding the regex strings and choosing force download should do fine.

Maybe...Ketarin should determine the {version} for FileHippo downloads correctly and automatically.

Yes this would be the preferred way.

Link to comment
Share on other sites

It would also be cool if we could add additional headers to specific jobs, for example, to add cookies. For FileHippo, this is what they use to determine if a result can include beta's or not:

Filter=NOBETA=1

 

You could also add "&NODEMO=1" to it to avoid shareware/demoware/trials. If we could add job-specific headers in a simple multiline textbox, we could paste in something like this:

Cookie: $Version=1; FH_PreferredCulture=en-US; Filter=NOBETA=1&NODEMO=1;

 

That would result in all transactions to FileHippo (version checks + downloads) avoiding the beta and trial software.

 

And while I initially thought, "hey, how about a cookie option", it really would be best to nip them all in the bud right now and just give full access to the request headers (maybe with a quick-list as seen here), since that would save quite a bit of time.

 

Accept

Accept-Charset

Accept-Encoding

Accept-Language

Accept-Ranges

Authorization

Cache-Control

Connection

Cookie

Content-Type

From

If-Match

If-Modified-Since

If-None-Match

If-Range

If-Unmodified-Since

Max-Forwards

Pragma

Proxy-Authorization

Range

Referer

TE

Upgrade

User-Agent

Via

Warning

Link to comment
Share on other sites

Ideed they use cookie for filter but there is currently no way to tell that to the variable because URL is same.

If they would append NOBETA=1 to url like this:

http://www.filehippo.com/download_utorrent&NOBETA=1 then it would be so much easyier.

 

Anyway thank you so much again CybTekSol for these regex codes.I tried and both seem working just fine now :) .If anything brakes due to some webpage changes i will let u know.

 

Btw u have 666 posts :D

Link to comment
Share on other sites

@Tomorrow,

 

I think you have misinterpreted what Flo and I are saying... users DO NOT NEED to capture the version info of FileHippo downloads with Ketarin at all. FileHippo (and FileHippo ONLY) is a special case and the ability to capture version info for their apps is BUILT-IN to Ketarin's code. TEST IT WITH A NEW FIleHippo app entry and toggle the avoid/download selections and you will see the captured version info in either case is correct.

 

BTW... post #667... ;)

Link to comment
Share on other sites

@Tomorrow,

 

I think you have misinterpreted what Flo and I are saying... users DO NOT NEED to capture the version info of FileHippo downloads with Ketarin at all. FileHippo (and FileHippo ONLY) is a special case and the ability to capture version info for their apps is BUILT-IN to Ketarin's code. TEST IT WITH A NEW FIleHippo app entry and toggle the avoid/download selections and you will see the captured version info in either case is correct.

 

BTW... post #667... ;)

Hmm i didnt know that :o

 

Still i dont use {version} .I use my custom variable to display version numbers so i guess that's why it does not show any version regardless of beta/avoid.

Link to comment
Share on other sites

CybTekSol, there are times when the version number returned by FileHippo is not formatted the way I want it to be, so I have to use a two-off variable to correctly obtain the version info, then format it. It's a pain, but necessary. If only one step is required, I can do it in the naming box, but sometimes more complete formatting is required.

 

It occurs to me that I might be able to use a new version-type variable ({myversion}), with a value like:

{version:multireplace:...}

And then use {myversion} within the file naming box. That ought to simplify things a bit.

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.