Jump to content
Ketarin forum

A template without steroids: Portablefreeware.com


FranciscoR
 Share

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
Link to comment
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 !=)

Link to comment
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 ! ;)

Link to comment
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.

Link to comment
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. ;)

Link to comment
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.

Link to comment
Share on other sites

  • 3 years later...
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>... :(

Link to comment
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...

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.