FranciscoR Posted January 21, 2009 Report Share Posted January 21, 2009 (edited) <?xml version="1.0" encoding="utf-16"?> <Jobs> <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <DownloadBeta>Default</DownloadBeta> <DownloadDate xsi:nil="true" /> <VariableChangeIndicator /> <CanBeShared>true</CanBeShared> <ShareApplication>false</ShareApplication> <HttpReferer /> <Variables> <item> <key> <string>ID</string> </key> <value> <UrlVariable> <VariableType>Textual</VariableType> <Regex /> <TextualContent><placeholder name="Portablefreeware ID" /></TextualContent> <Name>ID</Name> </UrlVariable> </value> </item> <item> <key> <string>version</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>/icon.gif"></a>.*?<p>.*?([\d]+?.[\d]+?\sBeta|\d+?.Beta|Beta.+?|Build.+?|[\d]+-[\d]+-[\d]+|[\d.]+|[\d]+)[&|<]</Regex> <Url>http://www.portablefreeware.com/?id={ID}</Url> <Name>version</Name> </UrlVariable> </value> </item> <item> <key> <string>ref</string> </key> <value> <UrlVariable> <VariableType>RegularExpression</VariableType> <Regex>download.php.(?|i)d=</Regex> <Url>http://www.portablefreeware.com/?id={ID}</Url> <Name>ref</Name> </UrlVariable> </value> </item> </Variables> <ExecuteCommand /> <Category>Test</Category> <SourceType>FixedUrl</SourceType> <DeletePreviousFile>true</DeletePreviousFile> <Enabled>true</Enabled> <FileHippoId /> <LastUpdated xsi:nil="true" /> <TargetPath>{target}\{category}\{appname}_{version}.{url:ext}</TargetPath> <FixedDownloadUrl>http://www.portablefreeware.com/{ref}{ID}</FixedDownloadUrl> <Name><placeholder name="Application Name" /></Name> </ApplicationJob> </Jobs> Usage: 1. Import XML into Ketarin; 2. Go to http://www.portablefreeware.com/ and locate the app you want to download. Click on Permalink; 3. Copy-paste ?id= value in the first Information box; 4. Copy-paste app name in the second Information box; 5. Customize all the rest at will. Example: 2. Permalink: http://www.portablefreeware.com/?id=1245 3. Portablefreeware ID: 1245 4. Application name: SysExporter Note: it doesn't work when there's no direct download link (neither Ketarin); other than that, it's a speed demon ! =) @CybTekSol: sorry, it's not complicated. @floele: It would be nice and time-saving to insert only the ?id= value, maybe we could add a PortableFreeware_ID box below Filehippo_ID ? In the future...? =D (this is not needed anymore) Edited January 23, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
floele Posted January 21, 2009 Report Share Posted January 21, 2009 Maybe, yes. But not for now. Why global variables? Link to comment Share on other sites More sharing options...
FranciscoR Posted January 21, 2009 Author Report Share Posted January 21, 2009 Why global variables? An alternative is a non-global variable with textual content. Do you like it better ? I think I do. Link to comment Share on other sites More sharing options...
FranciscoR Posted January 21, 2009 Author Report Share Posted January 21, 2009 Fixed. Link to comment Share on other sites More sharing options...
floele Posted January 21, 2009 Report Share Posted January 21, 2009 Then again, you can also make use of placeholders Link to comment Share on other sites More sharing options...
FranciscoR Posted January 21, 2009 Author Report Share Posted January 21, 2009 Perfetto !!! Link to comment Share on other sites More sharing options...
CybTekSol Posted January 22, 2009 Report Share Posted January 22, 2009 @FranciscoR, GOOD job... I like it! Oh... the power of the 'placeholder' implementation and ingenuity! Link to comment Share on other sites More sharing options...
FranciscoR Posted January 22, 2009 Author Report Share Posted January 22, 2009 @CybTekSol, Thanks ! I am also surprised, I had no idea I could do such things. Florian's assitance is really precious ! BTW, I learned how to use the placeholders with your Majorgeeks template (but I'm still scratching my head on how you do it =)). Thank you and keep the good job ! Link to comment Share on other sites More sharing options...
FranciscoR Posted January 22, 2009 Author Report Share Posted January 22, 2009 I think template is now ready for prime-time. Enjoy ! =) Link to comment Share on other sites More sharing options...
CybTekSol Posted January 22, 2009 Report Share Posted January 22, 2009 Try App ID 159 & 1388... 159 is the one my regex has trouble with on my revision. It's very difficult to make an 100% 'error free' template but don't give up. I haven't quite achieved it yet. It might be an elusive goal. Link to comment Share on other sites More sharing options...
FranciscoR Posted January 23, 2009 Author Report Share Posted January 23, 2009 Are you using my latest build, updated today ? No problems here with 159. The SIV error is not obvious for me, it should work. I'll have a look, but even downloading from firefox gives me a 27 sec delay. In the mean time you can try 1245, 1314, 159, 191, 1398, 775... but thanks for feedback !=) Link to comment Share on other sites More sharing options...
FranciscoR Posted January 23, 2009 Author Report Share Posted January 23, 2009 (edited) Problem with SIV is version, other than that it works perfect. I've just downloaded it. I'll fix this. =) Edited January 23, 2009 by FranciscoR Link to comment Share on other sites More sharing options...
CybTekSol Posted January 23, 2009 Report Share Posted January 23, 2009 Problem with SIV is version, other than that it works perfect. I've just downloaded it. I'll fix this. =)Yes, I was using the version you posted today... I should have stated that it was the version that was the problem... forgive me. Link to comment Share on other sites More sharing options...
FranciscoR Posted January 23, 2009 Author Report Share Posted January 23, 2009 I have just uploaded a revison, now SIV should work. The SIW problem is rather different - and unique in this site -, although file is downloaded as it should, I'm not sure how to solve it. All other apps have a version, but SIW doesn't; this causes Ketarin to grab everything up to "end of selection" as "version". How would you solve this ? Please, no need to apologize, and thanks again ! Link to comment Share on other sites More sharing options...
FranciscoR Posted January 23, 2009 Author Report Share Posted January 23, 2009 Problem with SIV is version' date=' other than that it works perfect. I've just downloaded it. I'll fix this. =)[/quote']Yes, I was using the version you posted today... I should have stated that it was the version that was the problem... forgive me. I mean the variable "version", it's because of that double "V", they are just too close, damn. But now it showld work. Link to comment Share on other sites More sharing options...
CybTekSol Posted January 23, 2009 Report Share Posted January 23, 2009 @FranciscoR, I chose to use a regular expression to 'scrape' the version info from PortableFreeware... it has worked with every App ID I have tested it with so far. The regex is: /icon.gif"></a>.*?<p>.*?(Beta.+?|Build.+?|[\d]+-[\d]+-[\d]+|[\d.]+|[\d]+)[&|<] Test it if you wish. Link to comment Share on other sites More sharing options...
FranciscoR Posted January 23, 2009 Author Report Share Posted January 23, 2009 @FranciscoR,I chose to use a regular expression to 'scrape' the version info from PortableFreeware... it has worked with every App ID I have tested it with so far. The regex is: /icon.gif"></a>.*?<p>.*?(Beta.+?|Build.+?|[\d]+-[\d]+-[\d]+|[\d.]+|[\d]+)[&|<] Test it if you wish. Try to grab version (not to download) from 271 and 509. And the "." after Beta causes Ketarin to get metacharacters and other strange stuff. I changed regex just a bit: /icon.gif"></a>.*?<p>.*?([\d]+?.[\d]+?\sBeta|\d+?.Beta|Beta.+?|Build.+?|[\d]+-[\d]+-[\d]+|[\d.]+|[\d]+)[&|<] I think I'm starting to like regex, I re-uploaded template. =) Btw, there are several downloads with daily quota, so Ketarin retrieves an error. Try to download with Firefox (?) and you will get this message: Daily download quota exceeded. Please try again tomorrow. Link to comment Share on other sites More sharing options...
CybTekSol Posted January 23, 2009 Report Share Posted January 23, 2009 @FranciscoR, Thanks... I'll make the change to mine. I believe regex is the way to go... I'm using it exclusively in my templates. The 'Daily Quota' issue is a pain and the only way around it is to find another source. Link to comment Share on other sites More sharing options...
Guest Midas Posted April 21, 2012 Report Share Posted April 21, 2012 /icon.gif"></a>.*?<p>.*?([\d]+?.[\d]+?\sBeta|\d+?.Beta|Beta.+?|Build.+?|[\d]+-[\d]+-[\d]+|[\d.]+|[\d]+)[&|<] I think I'm starting to like regex, I re-uploaded template. =) My Ketarin is complaining about that line, telling me that <Regex> doesn't match </a>... Link to comment Share on other sites More sharing options...
Guest Midas Posted April 21, 2012 Report Share Posted April 21, 2012 My Ketarin is complaining about that line, telling me that doesn't match ... Got it. When copy and pasting, that string has to be converted to HTML entities... 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