Jump to content
Ketarin forum
FranciscoR

A template without steroids: Portablefreeware.com

Recommended Posts

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

 

2m6wbpc.png

 

4. Application name: SysExporter

 

vcwcnb.png

 

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 by FranciscoR

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 !=)

Share this post


Link to post
Share on other sites
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. ;)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
@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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest Midas
/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>... :(

Share this post


Link to post
Share on other sites
Guest Midas
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...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

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