Jump to content
Ketarin forum

Setting up a auto download with version number in the link


PBSLTD
 Share

Recommended Posts

Hello

 

I am very new to using Ketarin, and am trying to workout how you would set the following link to load when they chage the version

 

http://download.avg.com/filedir/inst/avg_ipw_x64_all_2011_1170a3265.exe

 

all which chages is _2011_1170a3265.exe everytime there is a new build

 

 

i did try http://download.avg.com/filedir/inst/avg_ipw_x64_{version}.exe and http://download.avg.com/filedir/inst/*.exe

 

 

any thoughts

 

Paul

Link to comment
Share on other sites

Welcome aboard, Paul!

 

There are several methods, but the easiest is to scrape the filename directly from the AVG site, as you can see in the following AVG "free" template I've included below:

<?xml version='1.0' encoding='utf-8'?>
<Jobs>
 <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="d4c3b572-cf41-4d04-843b-35d8ace21f94">
   <SourceTemplate><![CDATA[]]></SourceTemplate>
   <WebsiteUrl>http://free.avg.com/us-en/download.prd-afh</WebsiteUrl>
   <UserAgent />
   <UserNotes />
   <IgnoreFileInformation>false</IgnoreFileInformation>
   <DownloadBeta>Default</DownloadBeta>
   <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
   <VariableChangeIndicator />
   <CanBeShared>true</CanBeShared>
   <ShareApplication>false</ShareApplication>
   <ExclusiveDownload>false</ExclusiveDownload>
   <HttpReferer />
   <SetupInstructions />
   <Variables>
     <item>
       <key>
         <string>version</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>[a-z0-9]{8}\.exe\)</a></td><td class="norm"[^<>]*>([\d\.]+)</Regex>
           <Url>http://free.avg.com/us-en/download.prd-afh</Url>
           <StartText>.exe)</a></td><td class="norm" width="24px" ></StartText>
           <EndText></td><td class="norm"</EndText>
           <Name>version</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>swebsite</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://free.avg.com/us-en/download-free-antivirus</TextualContent>
           <Name>swebsite</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>snotes</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent />
           <Name>snotes</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>schangelog</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>Textual</VariableType>
           <Regex />
           <TextualContent>http://free.avg.com/us-en/download-update</TextualContent>
           <Name>schangelog</Name>
         </UrlVariable>
       </value>
     </item>
     <item>
       <key>
         <string>sdownload</string>
       </key>
       <value>
         <UrlVariable>
           <RegexRightToLeft>false</RegexRightToLeft>
           <VariableType>RegularExpression</VariableType>
           <Regex>\(64bit\)<br /> \(([^'"]+\.exe)\)</a></td><td class="norm"[^<>]*>{version}</Regex>
           <Url>http://free.avg.com/us-en/download.prd-afh</Url>
           <Name>sdownload</Name>
         </UrlVariable>
       </value>
     </item>
   </Variables>
   <ExecuteCommand />
   <ExecutePreCommand />
   <ExecuteCommandType>Batch</ExecuteCommandType>
   <ExecutePreCommandType>Batch</ExecutePreCommandType>
   <Category>Security</Category>
   <SourceType>FixedUrl</SourceType>
   <DeletePreviousFile>true</DeletePreviousFile>
   <Enabled>true</Enabled>
   <TargetPath>.\{category}\{appname:regexreplace:([\s\t\r\n\-\\&\/]+):_}-{version}.{url:ext}</TargetPath>
   <FixedDownloadUrl>http://download.avgfree.com/filedir/inst/{sdownload}</FixedDownloadUrl>
   <Name>AVG Anti-Virus Free x64</Name>
 </ApplicationJob>
</Jobs>

 

Since you're targeting a different version you'll want to scrape from a different page. You can find the specific page to scrape from here:

http://www.avg.com/us-en/downloads

Click the "paid version" link next to the version you're after, and that has the list of downloads to scrape from. My guess is you want this list:

http://www.avg.com/us-en/downloads.prd-isc

Link to comment
Share on other sites

  • 5 months later...

Hello

 

Sorry for the delay in replying i have being trying many different ways

 

but i am still stuck.

 

i have the url to download from as http://www.avg.com/us-en/downloads.prd-isc

 

Clicked on Variable

 

and created one called Version as displayed in the picture but don't know what to do now.

 

PunBB bbcode testhttp://www.cumbriacomputerrepairs.co.uk/private/ket.PNG[/img]

 

i am trying to download the x86 version and the 64 bit version as two seperate downloads.

 

Paul

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.