Topic: CybTekSol's LifeHacker.com Exclusive Downloads Generic template:
My LifeHacker.com Exclusive Downloads Generic template:
This template uses Google's search engine to compensate for URL changes at LifeHacker.
NOTE: This is a 'generic' template which I use for LifeHacker.com Exclusive
Downloads when they are 'featured' on their site on any given day.
It may require a small tweak or two each time due to their inconsistencies
in page layout, but, it will give to something to play with. ![]()
1) There are two user defined global variables used, download_url={download_url}
(used as an alternative to {url})
and
root_folder=Insert YOUR download destination ROOT folder here
[for example C:\Latest-Apps].
2) The latest version of 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>{find}</HttpReferer>
<Variables>
<item>
<key>
<string>LifeHackerPageName</string>
</key>
<value>
<UrlVariable>
<VariableType>Textual</VariableType>
<Regex />
<TextualContent><placeholder name="LifeHacker.com Page Name from URL [Example: belvedere-automates-your-self+cleaning-pc]" /></TextualContent>
<Name>LifeHackerPageName</Name>
</UrlVariable>
</value>
</item>
<item>
<key>
<string>find</string>
</key>
<value>
<UrlVariable>
<VariableType>RegularExpression</VariableType>
<Regex>(?<=Search[ ]Results.*?a href=")http://lifehacker.com/[\d]+/.+?(?=")</Regex>
<Url>http://www.google.com/search?hl=en&hl=en&as_q=&as_epq={LifeHackerPageName}&as_sitesearch=lifehacker.com</Url>
<Name>find</Name>
</UrlVariable>
</value>
</item>
<item>
<key>
<string>version</string>
</key>
<value>
<UrlVariable>
<VariableType>RegularExpression</VariableType>
<Regex>Version.*?(Beta.+?Build.+?|Beta.+?|Build.+?|\d.*?)[?:\:|<|&]</Regex>
<Url>{find}</Url>
<Name>version</Name>
</UrlVariable>
</value>
</item>
<item>
<key>
<string>download_url</string>
</key>
<value>
<UrlVariable>
<VariableType>RegularExpression</VariableType>
<Regex>[a-z]+[ ]only:.*?a href="([a-z]+://.*?\.[a-z]{3})"</Regex>
<Url>{find}</Url>
<Name>download_url</Name>
</UrlVariable>
</value>
</item>
</Variables>
<ExecuteCommand />
<Category>LifeHacker-Exclusive-Apps</Category>
<SourceType>FixedUrl</SourceType>
<PreviousLocation />
<DeletePreviousFile>true</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 LifeHacker.com Page Name from URL
[Example: belvedere-automates-your-self+cleaning-pc]
and the application's name
c) Modify the Category to YOUR preferences
d) Change the 'Advanced Settings' to YOUR preferences
e) TWEAK the regular expressions for {version} and {download_url}
f) VERIFY...VERIFY...VERIFY that ALL regex matches WORK and
MAKE ADJUSTMENTS to them as necessary! REFINE it to YOUR NEEDS!
Enjoy!
CybTekSol




