Jump to content
Ketarin forum

CybTekSol's Universal FreewareFiles.com Template (Update)


CybTekSol
 Share

Recommended Posts

My Universal FreewareFiles.com Template: (TEST - Version 2)

 

DISCLAIMER: Use this template sparingly as they banned my static IP address

for monitoring 100+ apps every day or two through their site! Bummer... :(

 

****IMPORTANT: I believe this template WILL WORK for the VAST MAJORITY of

applications listed at FreewareFiles.com; this is a REVISED

version of my template that has been adjusted due to the complete

revision of their site (which amazingly occurred while I was refining the

template). ;)IT IS A WORK IN PROGRESS and I will post

improvements as they develop.

 

IT WILL FAIL if the first download location (or the second, if three

or more locations, etc.) is a re-direct to a download page instead

of a download link! If this happens adjust the regex for the

download_url by adding download after hxxp:// and

if the download is hosted by SourceForge then just add internap or

easynews , etc. in a like manner and it will probably pick it up.

 

****NOTE: This template uses the application's ID NUMBER from the application

DOWNLOAD page URL. In other words, go to the application's DOWNLOAD

page at FreewareFiles.com and copy the ID NUMBER that appears to the

right of the programid= in your web browser's address bar for THAT

page. For example, from Winamp Lite's DOWNLOAD page URL at

FreewareFiles:

(hxxp://www.freewarefiles.com/downloads_counter.php?programid=30579),

the ID NUMBER is 30579. The number is available on the application's info

page also... but a little harder to get at in the address bar.

 

1) There are two user defined global variables used, download_url={download_url}

(used as an alternative to {url}) and root_folder=YOUR Download Destination

ROOT Folder (for example C:\Latest Downloads).

 

2) Ketarin (.0.9.9.22) released January 18, 2009 or later is required as this revision

uses the new 'placeholder' feature implemented by Florian.

 

3) The template follows:

<?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>http://www.freewarefiles.com/downloads_counter.php?programid={FreewareFilesID}</HttpReferer>
   <Variables>
     <item>
       <key>
         <string>FreewareFilesID</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>Textual</VariableType>
           <Regex />
           <Url></Url>
           <TextualContent><placeholder name="FreewareFiles Program ID (i.e. 123 of programid=123 from App Download Page)" /></TextualContent>
           <Name>FreewareFilesID</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>class="bodylinks">Home</a>\s:.*?[\d]+\.html'.*?([\d]+.*?\s??|Alpha[\d]+.*?\s??|Alpha\s[\d]+.*?\s??|Beta[\d]+.*?\s??|Beta\s[\d]+.*?\s??|Build[\d]+.*?\s??|Build\s[\d]+.*?\s??|RC\s[\d]+.*?\s??|RC[\d]+.*?\s??)[\/|<|\(|\)]</Regex>
           <Url>http://www.freewarefiles.com/downloads_counter.php?programid={FreewareFilesID}</Url>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>download_url</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>(?<=src='images/download.gif'.+?<a href=')(http://.*?\.(exe|7z|zip|zip2|bz|bz2|bzip|gz|gzip|jar|lha|lzh|lzw|pak|rar|sit|sit!|sit5|sitd|sithqx|sitx|tz|wsz|cab|msi|bin|img|iso|xpi|pbp))(?=['\s])</Regex>
           <Url>http://www.freewarefiles.com/downloads_counter.php?programid={FreewareFilesID}</Url>
           <Name>download_url</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <Category>[iNSERT CATEGORY HERE]</Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile>false</DeletePreviousFile>
   <Enabled>true</Enabled>
   <FileHippoId />
   <LastUpdated xsi:nil="true" />
   <TargetPath>{root_folder}\{category}\{appname:replace: :_}_v{version:replace: :_}.{url:ext}</TargetPath>
   <FixedDownloadUrl>{download_url}</FixedDownloadUrl>
   <Name><placeholder name="Application Name" /></Name>
 </ApplicationJob>
</Jobs>

 

TO USE IT:

 

1) Define the user defined global variables under 'Settings' in Ketarin to YOUR preferences

2) Edit the template externally to reflect these modifications (if you choose

not to use mine) and change the <TargetPath> line to YOUR preferences

3) Then:

a) Import it (Obviously)

B) Enter the information needed as requested as a result of the 'placeholder' prompts...

it will ask for the application's ID NUMBER as described above and the application's

name

c) Modify the Category to your preferences

d) Change the 'Advanced Settings' to your preferences

e) VERIFY...VERIFY...VERIFY that ALL regex matches WORK and

MAKE ADJUSTMENTS to them as necessary!

 

****NOTE:

 

IF YOU WISH TO CREATE A TEMPLATE from one of YOUR XML exports:

 

1)It is important that the Guid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" string be

removed from the XML export to use it as a template, otherwise you'll just keep

overwriting the previously saved application entry that was created using the

imported template

2) The <DownloadDate> line must be changed to <DownloadDate xsi:nil="true" />

3) The <LastUpdated> line must be changed to <LastUpdated xsi:nil="true" />

4) Remove the entire <PreviousLocation> line or replace it with <PreviousLocation />

5) Create 'placeholder' entries as needed (see THIS thread)

 

I hope somebody can use it... feel free to modify it in any way you wish for your use or make suggestions.

 

CybTekSol

Edited by CybTekSol
Link to comment
Share on other sites

Unfortunately this doesn't work when the files aren't hosted on freewarefiles.
I believe that fact was adequately described above under the heading:

 

****IMPORTANT: This template works for FILES HOSTED by FreewareFiles.com

on THEIR SERVER, which is the majority of the applications

listed there..

 

Be patient... I am testing and refining a template designed to work with BOTH files hosted by FreewareFiles.com AND off-site... unless someone beats me to it! ;)

Link to comment
Share on other sites

Unfortunately this doesn't work when the files aren't hosted on freewarefiles.
I believe that fact was adequately described above under the heading:

 

****IMPORTANT: This template works for FILES HOSTED by FreewareFiles.com

on THEIR SERVER' date=' which is the majority of the applications

listed there..[/quote']

 

Perhaps the addition of the word "only", would have solved it for nma :-p

 

Ain't communication fun! Best,

--appyface

Link to comment
Share on other sites

Sorry. I didn't noticed that warning message.

 

Anyway, I solved the problem and I believe this RegEx gets the 1st download location. (Server 1: Software Author).

 

     <item>
       <key>
         <string>download_url</string>
       </key>
       <value>
         <UrlVariable>
           <VariableType>RegularExpression</VariableType>
           <Regex>(?<=<td valign='center' align='center' width='110' bgcolor='#EEEEEE'> <a href=').+?(?='><font style='font-size: 20'><b>Download</b></font></a>)</Regex>
           <Url>http://www.freewarefiles.com/downloads_counter.php?programid={freewarefiles_id}</Url>
           <Name>download_url</Name>
         </UrlVariable>
       </value>
     </item>

 

I hope this helps.

 

Cheers!

 

 

PS. I've also cleared the 'Spoof HTTP referer' property.

Edited by nma
Link to comment
Share on other sites

I am testing and refining a template designed to work with BOTH files hosted by FreewareFiles.com AND off-site...

Looking forward to see that wonder (and to do some benchmarketing myself), but I imagine that such a regex will be one mile long, so it's loading times won't be that good (or am I missing something ?); unless you're a real lazzy person with one template for everything, wouldn't several templates - one for each site - be a better strategy ? =) It's also more easy to maintain such a collection of templates, because if one webmaster changes it's download urls, you won't have to edit the whole gargantuan regex. ;)

Link to comment
Share on other sites

Wouldn't several templates - one for each site - be a better strategy ? =) It's also more easy to maintain such a collection of templates, because if one webmaster changes it's download urls, you won't have to edit the whole gargantuan regex. ;)
Don't burst my bubble... it's the thrill of the challenge... been working at tweaking that gargantuan regex for 7+ hours now... got close... then I was snapped back to reality. :(
Link to comment
Share on other sites

@nma,

Try your template with programid=13807 which is one that is throwing my 'universal' regex that I'm testing for a loop. Also, it appears FreewareFiles has just made some changes to their hypertext within the last couple of hours... they may be on to us!

Link to comment
Share on other sites

Wouldn't several templates - one for each site - be a better strategy ? =) It's also more easy to maintain such a collection of templates' date=' because if one webmaster changes it's download urls, you won't have to edit the whole gargantuan regex. ;)[/quote']Don't burst my bubble... it's the thrill of the challenge... been working at tweaking that gargantuan regex for 7+ hours now... got close... then I was snapped back to reality. :(

Sorry about that ! ;)

 

Btw, I have 2 tested, quick and flawless templates for Nirsofer.net and Sysinternals.com, do you want me to share them ? Do you think they have any interest for this forum section ? You can also use them to create any bundle ! =)

Link to comment
Share on other sites

For Sysinternals I download the suite, I'd like to see what you're doing?

 

For Nirsoft I use "It Sucks" LOL it's a site downloader. I do that because I want the documentation HTML pages downloaded along with the utilities. Still I'm interested in what you're doing!

 

So, is one person's interest enough, to post? :)

Link to comment
Share on other sites

Btw, I have 2 tested, quick and flawless templates for Nirsofer.net and Sysinternals.com, do you want me to share them ?
That's what this forum section was developed for FranciscoR. ;) Please do share, I'm running out of steam. ;) I encourage ALL Ketarin users that have customized a template to share their creation as there are so many variations of possibilities with Ketarin it may give us all some fresh ideas!
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.