Etz Posted July 9, 2011 Report Share Posted July 9, 2011 How to downlad only 64-bit installers from MajorGeeks with this template? For example: http://majorgeeks.com/Process_Lasso_d4050.html Link to comment Share on other sites More sharing options...
shawn Posted July 9, 2011 Report Share Posted July 9, 2011 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 Link to comment Share on other sites More sharing options...
Etz Posted July 10, 2011 Report Share Posted July 10, 2011 (edited) 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 July 10, 2011 by Etz Link to comment Share on other sites More sharing options...
shawn Posted July 10, 2011 Report Share Posted July 10, 2011 It's missing a "+". Try with this: href="(http://majorgeeks.com/downloadget.php\?.*?)">[\s\r\n\t]*<IMG[^<>]+"images/icons/x64 Link to comment Share on other sites More sharing options...
Etz Posted July 10, 2011 Report Share Posted July 10, 2011 (edited) 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 July 10, 2011 by Etz Link to comment Share on other sites More sharing options...
shawn Posted July 10, 2011 Report Share Posted July 10, 2011 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 More sharing options...
Etz Posted July 11, 2011 Report Share Posted July 11, 2011 (edited) 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 July 12, 2011 by Etz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now