Jump to content
Ketarin forum

BrotherSoft/Download.com/MajorGeeks/SnapFiles/Softonic/CleanSofts...


Reformed Pirate
 Share

Recommended Posts

Something like this ought to work (use it on the appredirect variable):

href="(http://majorgeeks.com/downloadget.php\?.*?)">[\s\r\n\t]*<IMG[^<>]"images/icons/x64

 

In this case it doesnt, it doesnt match anything... (Failed, The format of the URI "" cannot be determined.)

http://majorgeeks.com/Prime95_d4363.html

 

Second question is how to generally match Build if it exists?

So I could use that regex in all MG apps, in those that does include Build number and for those which doesnt

Edited by Etz
Link to comment
Share on other sites

It's missing a "+". Try with this:

href="(http://majorgeeks.com/downloadget.php\?.*?)">[\s\r\n\t]*<IMG[^<>]+"images/icons/x64

 

Yes, this version works...but breaks template and doesnt download...

Problem is, it matches both download references...

 

 <A href="(http://majorgeeks.com/downloadget.php\?.*?)">[\s\r\n\t]*<IMG[^<>]+"images/icons/x64

Works, but it ain`t very pretty, if they fix their HTML, and remove " ", it will break...

 

Also still cant figure out, how to mach version+build, for example 26.6 Build 3 as version number... :(

 

Sorry for stupid questions, but I`m a novice at regexp... :S

Edited by Etz
Link to comment
Share on other sites

You're pretty safe there. Most of these sites don't change their code very much at all, which is why programs like this are able to work at all.

 

For the version, you can try something like this:

</a>\s\|\s\S+\s([\d\.build\s]+?)\s*[\r\n]

That ought to work for most of these apps on MG, as long as it doesn't have a space in the title. If you share your current template I can provide a more universal solution.

Link to comment
Share on other sites

You're pretty safe there. Most of these sites don't change their code very much at all, which is why programs like this are able to work at all.

 

For the version, you can try something like this:

</a>\s\|\s\S+\s([\d\.build\s]+?)\s*[\r\n]

That ought to work for most of these apps on MG, as long as it doesn't have a space in the title. If you share your current template I can provide a more universal solution.

 

Never mind, found solution myself...and thanks for pointing me to the right direction :)

 

(?-s:(\d+(?:\.\d+)+.*?|\d b[a-z]* ?\d+|\d+ sp\w+|r\d+)(?= ?(?:download|[<\[\]]))|(?-s:20\d\d-\d\d-\d\d))

 

It aint pretty, but it works ...

Edited by Etz
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.